Configuring sendmail to 'just work' for dev environment in windows

168 views
Skip to first unread message

Francis

unread,
Sep 2, 2008, 7:25:41 PM9/2/08
to Google App Engine
Any chance anyone can give a little play by play of how to get mail
sending working with the dev server, in windows, with my ISP SMTP
server?

I'm travelling, and even at home I don't have an SMTP server to
configure this stuff for - seems like I should be able to set up the
dev server to use some version of sendmail to use IMAP to send mail
through my gmail account.

Are there versions of sendmail for windows that can use a gmail login
to send outgoing mail? Where do I get them? How do I set them up?

I'll keep trying and post my solution as a reply if I find it before
someone replies.

Francis

unread,
Sep 2, 2008, 10:06:00 PM9/2/08
to Google App Engine
Ok - I think I got this all working - trick is to use stunnel to make
it so you can use Google's smtp server, which requires an SSL
connection.

props to http://www.projectpier.org/node/817 for the related guide I
got this working from.

1. Install stunnel from http://www.stunnel.org/download/

2. Configure stunnel's stunnel.conf

Here is my stunnel.conf:

cert = stunnel.pem
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
debug = 7
output = stunnel.log
client = yes

[smtpg]
accept = 127.0.0.1:25
connect = smtp.gmail.com:465
;or connect = 72.14.215.109:465 so there's no DNS lookup

3. Run stunnel from the Start Menu - the "run stunnel" shortcut

4. Run the dev server like this:
google_appengine\dev_appserver.py --smtp_host=localhost --
smtp_user=<your gmail> --smtp_password=<your gmail password> <your
app>

working mail in the test environment :)
Reply all
Reply to author
Forward
0 new messages