![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Location: USA
Posts: 3
Rep Power: 0
![]() |
How can I send e-mail via python?
Hello I am trying to write a python program that will send my log files to my email. Does python have a library that supports sending email? thanks
![]() Last edited by polernon; Nov 15th, 2005 at 1:01 AM. |
|
|
|
|
|
#2 |
|
Professional Programmer
|
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
I've done this before, it was pretty cool.
I used smtplib to send mail and poplib to recieve it. If you want to practice with it, use the Python shell.
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Oct 2005
Location: USA
Posts: 3
Rep Power: 0
![]() |
Thanks for the help, I think the reason I didn't find it on google was because I wasn't sure what I was looking for. I got caught up on the gmail and msn libraries and expected something similar for general email.
|
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: Dec 2005
Posts: 118
Rep Power: 0
![]() |
Their example doesn't work on the machine I'm on at the moment - it's WinXP, could it be due to security settings?
Quote:
|
|
|
|
|
|
|
#6 |
|
Banned
![]() ![]() |
For the code: "smtplib.SMTP('localhost')", you need 'localhost' to be a mail server that you have working.
Mine for example, was a free account I setup at www.nerdshack.com, it worked very nicely. And I could recieve all the emails simply from Thunderbird/Outlook Explorer. In that case, 'localhost' is replaced by: 'mail.nerdshack.com:2525' |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
Join Date: Dec 2005
Posts: 118
Rep Power: 0
![]() |
Ah, so you have to have a server address and port number
now it works, thanks. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|