e-mail Plugin?

New releases and general discussions.

Post » Fri Sep 02, 2011 9:21 pm

Hi there fellow people of CN
I want to know is it plausible to create a plugin that can send a e-mail to a address?
B
7
S
2
G
1
Posts: 193
Reputation: 1,745

Post » Fri Sep 02, 2011 10:11 pm

Plausible? ... Yes    , Likely? ... No

This is such a niche request that it would be easier to just make it with Python (SMTP):

#!/usr/bin/python

import smtplib

sender = 'from@fromdomain.com'
receivers = ['to@todomain.com']

message = """From: From Person <from@fromdomain.com>
To: To Person <to@todomain.com>
Subject: SMTP e-mail test

This is a test e-mail message.
"""

try:
   smtpObj = smtplib.SMTP('localhost')
   smtpObj.sendmail(sender, receivers, message)       
   print "Successfully sent email"
except SMTPException:
   print "Error: unable to send email"


Or more likely you will have to use IMAP/Pop3 service like Gmail:
http://www.devshed.com/c/a/Python/Python-Email-Libraries-part-1-POP3/
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Sep 03, 2011 6:36 am

ok, But a plugin like that would be more cooler, But thanks
B
7
S
2
G
1
Posts: 193
Reputation: 1,745

Post » Sat Sep 03, 2011 10:02 pm

In that case, you could use c++ code similar to the below in your plugin. The plugin shouldn't be too hard to create if you know C++:

http://www.apacheserver.net/q30205/C-OpenSSL-Connecting-to-imap-google-with-SSL

Good luck!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Fri Sep 23, 2011 5:28 pm

the python does not work it keep giveing me some errors
B
7
S
2
G
1
Posts: 193
Reputation: 1,745

Post » Sat Sep 24, 2011 1:22 am

>> the python does not work it keep giveing me some errors
What errors are you having, what type of library did you use, can you post a snippet of the code that caused the error?
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Sep 24, 2011 7:50 am

Can I ask a huge favor, can someone just make a template for me that work, bec i think i am doing something rong?
B
7
S
2
G
1
Posts: 193
Reputation: 1,745

Post » Sat Sep 24, 2011 4:58 pm

>> bec i think i am doing something rong?
I believe in helping people to fish for themselves...especially on something that is easy enough to solve.

Post what you are doing, what errors and somebody can point you in the right direction. This is a non-standard request so I don't think somebody is going to research it, program, debug, and solve it all for you.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Sep 29, 2011 1:00 pm

U can also Have E-Mail plugins using google
B
2
G
1
Posts: 1
Reputation: 452

Post » Wed Dec 14, 2011 3:47 am

Use google E-mail plugins
B
2
G
1
Posts: 4
Reputation: 458

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests