views:

318

answers:

2

I need to send emails from my web application (on account creation, password reset, etc.). This application will most likely be hosted on a standard hosting site (or possibly on Amazon EC2), not on Google App Engine.

However, I like the ease of use for sending email through App Engine. Is there a way to host your application elsewhere but use App Engine to send emails programatically? I suppose I could send a web request from my application to a custom application on App Engine, parse the request, and then send the email from App Engine.

However, I would like to avoid having to create an application on App Engine even if it is very simple as it would be another item to maintain. Is there a simpler way to just use App Engine as the email gateway, similar to using Google Apps for my Domain?

I don't need to receive email by the application. Also, I would like all emails to come from the same domain (like [email protected]) regardless of if it were sent from the hosted application or App Engine.

A: 

Edit: As mentioned, I am totally wrong! Above post is correct.

First, I am very positive if you want to use App Engine's features you need to actually build an app on it. You can't use their API on external applications. You are right though that you could simply send a request to your app engine app if you wanted it to send email. I don't see how it would be too hard to maintain if that's all it is doing.

Second, if you are planning to send emails via GMail's service, they don't allow you to mask the from address so you will always see it from whatever gmail address you're sending it from.

Why not just send emails from your application but use whatever email service you use now? In most languages and frameworks, SENDING email and not managing it is a breeze.

Bartek
I don't know what goes into getting an email server running on a hosted app requires, and it seemed like App Engine would be much simpler. I know sending an email from Java programatically isn't hard, but the configuration is what I don't know. Guess I'll have to start finding that out.
David Buckley
Very positive, but wrong. ;)
Nick Johnson
+3  A: 

You can do this using remote_api. Simply upload a Python app with nothing but the remote api handler included; you can then use the Python remote api library to send emails via App Engine.

Note that emails sent by the App Engine Mail API have to be from an administrator of the app (or the logged in user, but this doesn't apply over remote api). Thus, you'll want to add whatever from account you want as an administrator to the app.

Nick Johnson
Wow, didn't know about this. :)
Bartek
remote_api support for email is new - originally it only supported datastore operations.
Nick Johnson
Is this available for Java? The documentation on the App Engine site seems to only reference the Python library.
David Buckley
Not yet - it's a work in progress.
Nick Johnson