Hi Gideon, I tried your program on the command line and except for the last
line, it worked.
My line-by-line comments, for those who might benefit from it...
> --begin--
> import smtpd, smtplib
> class GmailSMTPProxy(smtpd.SMTPServer):
> def process_message(self, peer, mailfrom, rcpttos, data):
> server = smtplib.SMTP('smtp.gmail.com',587)
> server.ehlo()
> server.starttls()
> server.ehlo()
In my own trials, I didn't issue the first ehlo().
> server.login('[EMAIL PROTECTED]', 'password')
Didn't find the above line in the python docs, so I never knew this method
existed.
> server.sendmail(mailfrom, rcpttos, data)
> server.quit()
quit() throws an exception in my case. close() works fine.
Thanks and regards,
Obet
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph