use smtpd as a gmail proxy server

R

Robin Becker

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.ehlo()
mailServer.starttls()
mailServer.ehlo()
mailServer.login(gmailUser, gmailPassword)
mailServer.sendmail(gmailUser, recipient, msg)
mailServer.close()

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top