Re: [google-appengine] Using SMTP on GAE

536 views
Skip to first unread message

Barry Hunter

unread,
Sep 19, 2012, 2:49:33 PM9/19/12
to google-a...@googlegroups.com
To send mail use the Mail API - that is the only supported way to do it. 


In Production - on appspot - the Mail API sends emails via Googles infrastructure. 

But the development environment is emulating the real environment. It of course cant use Googles infrastructure, so instead you tell give it a SMTP server it can use directly. The SMTP interface is not exposed to the actual application (because it would be non functional online anyway) 


On Wed, Sep 19, 2012 at 2:07 PM, ruralgeek <zbh...@gmail.com> wrote:
Hello ! I have some problems about sending email on GAE.
The book  Programming Google App Engine  tells that:

To configure the Python development server to use an SMTP server to send email, use the --smtp_host=... (with optional --smtp_port=...), --smtp_user=..., and --smtp_password=... arguments:

dev_appserver.py \
    --smtp_host=smtp.example.com \
    --smtp_user=exmail \
    --smtp_password="t3!!t43w0r!d" \
    appdir

But I can't find that GAE supports using SMTP to send email.


Now I want to send email from my own domain accounts (e.g. us...@example.com),and I have a SMTP server(smtp.example.com).
How can I do it?
Thanks.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/KqlMhXszWcMJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Barry Hunter

unread,
Sep 19, 2012, 2:54:59 PM9/19/12
to google-a...@googlegroups.com
On Wed, Sep 19, 2012 at 7:49 PM, Barry Hunter  wrote:
To send mail use the Mail API - that is the only supported way to do it. 

PErhaps should qualify that: The only way to do it running directly in AppEngine. 

Can use other third party services/servers, as long as they have HTTP Interface/API (to be used by URLFetch API) or a number of other protocols that AppEngine supports (email! and XMPP) . 

So if you really need to send via SMTP, could find a server that has a HTTP interface, which then dispatches off via SMTP

ruralgeek

unread,
Sep 20, 2012, 9:18:20 AM9/20/12
to google-a...@googlegroups.com
Thank you for helping me to answer questions.
I found my problem. I have thought that development web server is on the server.Actually it is on the local.
Also,thank you for your suggestions.I will consider them.

在 2012年9月20日星期四UTC+8上午2时55分40秒,barryhunter写道:

Peter McKenzie

unread,
Sep 21, 2012, 4:49:12 PM9/21/12
to google-a...@googlegroups.com
FYI: the Sockets API lets you use SMTP (authenticated SMTP only).  If you're interested in trying it out, please sign up for the trusted tester program:
Reply all
Reply to author
Forward
0 new messages