Permalink
Browse files

Fixed #27

  • Loading branch information...
1 parent 63bfe2d commit 5846c6cb0665ce9077a1eaea3b268b560b216032 @maccesch committed Jun 7, 2012
Showing with 8 additions and 1 deletion.
  1. +7 −0 README.rst
  2. +1 −1 cmsplugin_contact/cms_plugins.py
View
@@ -58,6 +58,13 @@ AKISMET_API_KEY
The same as for ReCAPTCHA goes fo Akismet.
+DEFAULT_FROM_EMAIL
+------------------
+
+This django setting is used to set the ``From`` header of the emails. The value you can enter in django admin only sets the ``Reply-To`` header.
+This is because many servers reject mails that claim to be ``From`` different email addresses than registered with the server.
+
+
Extending
=========
@@ -103,7 +103,7 @@ def send(self, form, site_email):
render_to_string(self.email_template, {
'data': form.cleaned_data,
}),
- form.cleaned_data['email'],
+ getattr(settings, 'DEFAULT_FROM_EMAIL', form.cleaned_data['email']),
[site_email],
headers = {
'Reply-To': form.cleaned_data['email']

0 comments on commit 5846c6c

Please sign in to comment.