Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1555 -- Added EMAIL_PORT setting. Thanks, bde3

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8d70ed4b25d65df8fe9f2a783f9f2a87bc7aaea1 1 parent cd7dbd8
Adrian Holovaty authored April 11, 2006
3  django/conf/global_settings.py
@@ -89,6 +89,9 @@
89 89
 # Host for sending e-mail.
90 90
 EMAIL_HOST = 'localhost'
91 91
 
  92
+# Port for sending e-mail.
  93
+EMAIL_PORT = 25
  94
+
92 95
 # Optional SMTP authentication information for EMAIL_HOST.
93 96
 EMAIL_HOST_USER = ''
94 97
 EMAIL_HOST_PASSWORD = ''
2  django/core/mail.py
@@ -30,7 +30,7 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST
30 30
     If auth_user and auth_password are set, they're used to log in.
31 31
     """
32 32
     try:
33  
-        server = smtplib.SMTP(settings.EMAIL_HOST)
  33
+        server = smtplib.SMTP(settings.EMAIL_HOST, settings.EMAIL_PORT)
34 34
         if auth_user and auth_password:
35 35
             server.login(auth_user, auth_password)
36 36
     except:
11  docs/settings.txt
@@ -334,6 +334,8 @@ Default: ``'localhost'``
334 334
 
335 335
 The host to use for sending e-mail.
336 336
 
  337
+See also ``EMAIL_PORT``.
  338
+
337 339
 EMAIL_HOST_PASSWORD
338 340
 -------------------
339 341
 
@@ -358,6 +360,15 @@ Django won't attempt authentication.
358 360
 
359 361
 See also ``EMAIL_HOST_PASSWORD``.
360 362
 
  363
+EMAIL_PORT
  364
+----------
  365
+
  366
+Default: ``25``
  367
+
  368
+**New in Django development version.**
  369
+
  370
+Port to use for the SMTP server defined in ``EMAIL_HOST``.
  371
+
361 372
 EMAIL_SUBJECT_PREFIX
362 373
 --------------------
363 374
 

0 notes on commit 8d70ed4

Please sign in to comment.
Something went wrong with that request. Please try again.