Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#1555 closed defect (fixed)

[patch][magic-removal] Fix to allow for sending email on non-standard SMTP ports.

Reported by: bde3@… Owned by: Adrian Holovaty
Component: Core (Other) Version: magic-removal
Severity: normal Keywords: mail smtp port
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Fix to allow django.core.mail.send_mail() to work with a non-standard SMTP port. (i.e. not 25)

Attachments (1)

mail_with_port.diff (953 bytes) - added by bde3@… 12 years ago.
patch to allow any SMTP port

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by bde3@…

Attachment: mail_with_port.diff added

patch to allow any SMTP port

comment:1 Changed 12 years ago by Chris Beaven

milestone: Version 0.92

Good, purposeful and easily implemented patch, bde@.

Alternatively, if we didn't want to add another setting, then perhaps EMAIL_HOST could be made to check for a :port. In django/core/

port = 25
host = settings.EMAIL_HOST
if ':' in host:
    host, port = host.split(':', 1)
    port = int(port)
server = smtplib.SMTP(host, port) 

You'd also want to change the comment for EMAIL_HOST in django/conf/ to reflect this new functionality.

comment:2 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2665]) Fixed #1555 -- Added EMAIL_PORT setting. Thanks, bde3

comment:3 Changed 11 years ago by Adrian Holovaty

milestone: Version 0.92

Milestone Version 0.92 deleted

Note: See TracTickets for help on using tickets.
Back to Top