summaryrefslogtreecommitdiffstats
path: root/forum/conf/email.py
blob: 0144f35e70ffab562e6afa6121f64e2dc43a3fc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
"""
Email related settings
"""
from forum.conf.settings_wrapper import settings
from livesettings import ConfigurationGroup, IntegerValue, BooleanValue
from livesettings import StringValue
from django.utils.translation import ugettext as _
from forum import const

EMAIL = ConfigurationGroup(
            'EMAIL',
            _('Email and email alert settings'), 
        )

settings.register(
    IntegerValue(
        EMAIL,
        'MAX_ALERTS_PER_EMAIL',
        default=7,
        description=_('Maximum number of news entries in an email alert')
    )
)

settings.register(
    StringValue(
        EMAIL,
        'DEFAULT_NOTIFICATION_DELIVERY_SCHEDULE',
        default='w',
        choices=const.NOTIFICATION_DELIVERY_SCHEDULE_CHOICES,
        description=_('Default news notification frequency'),
        help_text=_(
                    'This option currently defines default frequency '
                    'of emailed updates in the following five categories: '
                    'questions asked by user, answered by user, individually '
                    'selected, entire forum (per person tag filter applies) '
                    'and posts mentioning the user and comment responses'
                    )
    )
)

settings.register(
    BooleanValue(
        EMAIL,
        'EMAIL_VALIDATION',
        default=False,
        hidden=True,
        description=_('Require email verification before allowing to post'),
        help_text=_('Active email verification is done by sending a verification key in email')
    )
)

settings.register(
    BooleanValue(
        EMAIL,
        'EMAIL_UNIQUE',
        default=True,
        description=_('Allow only one account per email address')
    )
)

settings.register(
    StringValue(
        EMAIL,
        'ANONYMOUS_USER_EMAIL',
        default='anonymous@askbot.org',
        description=_('Fake email for anonymous user'),
        help_text=_('Use this setting to control gravatar for email-less user')
    )
)