[Django]-How to send emails from django App in Google App Engine

3👍

By default Django comes with an email backend that uses sendmail to send email. Sendmail is not available on App Engine.

If you use Django-nonrel, it comes with an email backend that uses GAE’s email service.
https://github.com/django-nonrel/djangoappengine, look in mail.py

As far as I know, it’s only been tested to work with the entire Django-nonrel framework. If you’re using it without the rest of Django-nonrel, some hackery is required.

2👍

Google only allows you to send emails from a domain name that they control in the google app engine. So you will either have to send it from the test domain they give you, a gmail account, or you need to use their name servers for your domain name.

2👍

Problem solved.

Just follow the link.
http://andialbrecht.de/blog/2009/11/04/pluggable-app-engine-e-mail-backends-for-django.html

I think this is the easiest method for using Django email functions in Google App Engine.

👤Anoop

2👍

Yeah appengine_django does not work. you need to use djangoappengine.mail.EmailBackend
so your settings.py should have:

EMAIL_BACKEND = 'djangoappengine.mail.EmailBackend'

Then you can use django’s native send_mail function to send emails. I have myself tested it to work.

Leave a comment