]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/settings/email.py
Adds an option to set a reply-to address on emails
[osqa.git] / forum / settings / email.py
index 4c9486a5dd7a57b46778e465362300342368a7a0..7922385fc2f37fe49b05b0c2471add59b5088fa6 100644 (file)
@@ -2,20 +2,15 @@ from base import Setting, SettingSet
 from django.utils.translation import ugettext_lazy as _\r
 from django.forms.widgets import PasswordInput\r
 from django.forms.widgets import RadioSelect\r
+from forms import TestEmailSettingsWidget\r
 \r
 EMAIL_SET = SettingSet('email', _('Email settings'), _("Email server and other email related settings."), 50)\r
 \r
-EMAIL_SUBSCRIBE_CHOICES = (\r
-    ('y', _('Users are subscribed by default')),\r
-    ('n', _('Users are not subscribed by default')),\r
-)\r
-\r
-INITIAL_EMAIL_SUBSCRIBE_OPTION = Setting('INITIAL_EMAIL_SUBSCRIBE_OPTION', 'y', EMAIL_SET, dict(\r
-label = _("Default email subscription"),\r
-widget=RadioSelect,\r
-choices=EMAIL_SUBSCRIBE_CHOICES,\r
-help_text = _("Choose what should be the default email subscription status while registering."),\r
-required=False))\r
+TEST_EMAIL_SETTINGS = Setting('TEST_EMAIL_SETTINGS', '', EMAIL_SET, dict(\r
+label = _("E-Mail settings test"),\r
+help_text = _("Test the current E-Mail configuration."),\r
+required=False,\r
+widget=TestEmailSettingsWidget))\r
 \r
 EMAIL_HOST = Setting('EMAIL_HOST', '', EMAIL_SET, dict(\r
 label = _("Email Server"),\r
@@ -40,17 +35,22 @@ widget=PasswordInput))
 \r
 EMAIL_USE_TLS = Setting('EMAIL_USE_TLS', False, EMAIL_SET, dict(\r
 label = _("Use TLS"),\r
-help_text = _("Does your SMTP server usFes TLS for authentication."),\r
+help_text = _("Whether to use TLS for authentication with your SMTP server."),\r
 required=False))\r
 \r
 DEFAULT_FROM_EMAIL = Setting('DEFAULT_FROM_EMAIL', '', EMAIL_SET, dict(\r
-label = _("Site 'from' email address"),\r
+label = _("Site 'from' Email Address"),\r
 help_text = _("The address that will show up on the 'from' field on emails sent by your website."),\r
 required=False))\r
 \r
+DEFAULT_REPLY_TO_EMAIL = Setting('DEFAULT_REPLY_TO_EMAIL', '', EMAIL_SET, dict(\r
+label = _("Site 'reply-to' Email Address"),\r
+help_text = _("The address that will show up on the 'reply-to' field on emails sent by your website."),\r
+required=False))\r
+\r
 EMAIL_SUBJECT_PREFIX = Setting('EMAIL_SUBJECT_PREFIX', '', EMAIL_SET, dict(\r
-label = _("Email subject prefix"),\r
-help_text = _("Every email sent through your website will have the subject prefixed by this string. It's usually a good idea to have such a prefix so your users can easily set up a filter on theyr email clients."),\r
+label = _("Email Subject Prefix"),\r
+help_text = _("Every email sent through your website will have the subject prefixed by this string. It's usually a good idea to have such a prefix so your users can easily set up a filter on their email clients."),\r
 required=False))\r
 \r
 EMAIL_FOOTER_TEXT = Setting(u'EMAIL_FOOTER_TEXT', '', EMAIL_SET, dict(\r
@@ -59,20 +59,28 @@ help_text = _("Email footer text, usually \"CAN SPAM\" compliance, or the physic
 required=False))\r
 \r
 EMAIL_BORDER_COLOR = Setting('EMAIL_BORDER_COLOR', '#e5ebf8', EMAIL_SET, dict(\r
-label = _("Email Border color"),\r
+label = _("Email Border Color"),\r
 help_text = _("The outter border color of the email base template"),\r
 required=False))\r
 \r
 EMAIL_PARAGRAPH_STYLE = Setting('EMAIL_PARAGRAPH_STYLE', "color:#333333;font-family:'helvetica neue', arial, Helvetica, sans-serif;line-height:18px;font-size:14px;margin-top:10px;", EMAIL_SET, dict(\r
-label = _("Email Paragraph style"),\r
+label = _("Email Paragraph Style"),\r
 help_text = _("A valid css string to be used to style email paragraphs (the P tag)."),\r
 required=False))\r
 \r
 EMAIL_ANCHOR_STYLE = Setting('EMAIL_ANCHOR_STYLE', "text-decoration:none;color:#3060a8;font-weight:bold;", EMAIL_SET, dict(\r
-label = _("Email link style"),\r
+label = _("Email Link Style"),\r
 help_text = _("A valid css string to be used to style email links (the A tag)."),\r
 required=False))\r
 \r
+SEND_DIGEST_ONLY_TO_ACTIVE_USERS = Setting('SEND_DIGEST_ONLY_TO_ACTIVE_USERS', True, EMAIL_SET, dict(\r
+label = _("Send digest only to active users"),\r
+help_text = _("If checked the daily digest won't be sent to users that have been suspended."),\r
+required=False))\r
 \r
+SEND_DIGEST_ONLY_TO_VALIDATED_USERS = Setting('SEND_DIGEST_ONLY_TO_VALIDATED_USERS', True, EMAIL_SET, dict(\r
+label = _("Send digest only to validated users"),\r
+help_text = _("If checked the daily digest won't be sent to users that haven't validated their emails."),\r
+required=False))\r
 \r
 EMAIL_DIGEST_FLAG = Setting('EMAIL_DIGEST_FLAG', None)\r