diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-04-11 03:23:03 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-04-11 03:23:03 +0000 |
| commit | 8d70ed4b25d65df8fe9f2a783f9f2a87bc7aaea1 (patch) | |
| tree | de43c9a3b1bfb42755d537e7178566124af2bf26 /django | |
| parent | cd7dbd8f00b49b5c58838e21a3675d05f86b8ac4 (diff) | |
Fixed #1555 -- Added EMAIL_PORT setting. Thanks, bde3
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/conf/global_settings.py | 3 | ||||
| -rw-r--r-- | django/core/mail.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 560d5658ea..f6ec3d2611 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -89,6 +89,9 @@ DATABASE_PORT = '' # Set to empty string for default. Not used with # Host for sending e-mail. EMAIL_HOST = 'localhost' +# Port for sending e-mail. +EMAIL_PORT = 25 + # Optional SMTP authentication information for EMAIL_HOST. EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' diff --git a/django/core/mail.py b/django/core/mail.py index 4f196c5b25..6a3cba141c 100644 --- a/django/core/mail.py +++ b/django/core/mail.py @@ -30,7 +30,7 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST If auth_user and auth_password are set, they're used to log in. """ try: - server = smtplib.SMTP(settings.EMAIL_HOST) + server = smtplib.SMTP(settings.EMAIL_HOST, settings.EMAIL_PORT) if auth_user and auth_password: server.login(auth_user, auth_password) except: |
