Django email setup on Hostgator

On Hostgator it is possible to run Django applications with FastCgi, but it has only sendmail as email back-end which is not included in Django.

Hopefully there is a snipets to resolve this limitation. You just needed to change the path of the sendmail file and it was ready to run. The location of sendmail is "/usr/sbin/sendmail" on our Hostgator server.

And the email backend should be configured in your settings.py by adding the following line:

EMAIL_BACKEND = 'sendmail.EmailBackend'

Dajngo app unicode JSON repsonse

If your django application has unicode data, and your view uses jquery and JSON response, do not forget to specify the encoding for the mimetype:

return HttpResponse(simplejson.dumps(your_data),
mimetype='application/json; charset=utf-8')