maccesch / cmsplugin-contact

Extendable contact plugin for django-cms with spam protection and i18n
BSD 2-Clause "Simplified" License
71 stars 62 forks source link

Google App Engine integration #28

Closed welsh-dwarf closed 12 years ago

welsh-dwarf commented 12 years ago

Hi,

Google App Engine doesn't allow for certain low level functionality essential to sending mail. In order to allow this plugin to work in the GAE sandbox, I've added the necessary functionality to send mail over the GAE Mail API.

I've also added a switch (USE_GAE_MAIL) that allows you to activate or not the Google functionality. Defaults to off to preserve compatibility.

Remarks welcome :)

mitar commented 12 years ago

This is not the correct way to do it. You should create a Django e-mail sending backend and configure it in your settings.

https://docs.djangoproject.com/en/dev/topics/email/#email-backends

maccesch commented 12 years ago

Thanks for the effort, though. Maybe this will help: http://andialbrecht.de/blog/2009/11/04/pluggable-app-engine-e-mail-backends-for-django.html

welsh-dwarf commented 12 years ago

Thanks for the info.

I suppose that this was a newbie kind of mistake, just trying to get everything to work for deploying my site.

I'll re-work it so that it's done properly (ie the django way) in the next few weeks, and publish as an egg so that no one else falls into that trap :).