use smtpd as a gmail proxy server
robin at reportlab.com
Wed Apr 22 14:14:45 CEST 2009
A bit of googling reveals that it's possible to use smtplib to do mailing using
gmail. Is there a way to use smtpd as a proxy server with gmail.
This apparently works with smtplib,
> mailServer = smtplib.SMTP('smtp.gmail.com', 587)
> mailServer.login(gmailUser, gmailPassword)
> mailServer.sendmail(gmailUser, recipient, msg)
but I'm trying to test an application that will use its host's mta eventually to
send mail so I need to set up a local proxy that can log in to gmail.
Is there an easy way forward with smtpd?
Looking in the PureProxy code it seems that I need to mess with the _deliver
method to use the above approach, but there isn't any convenient hook.
More information about the Python-list