Opened 9 years ago

Closed 9 years ago

Last modified 9 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
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:

Description

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@… 9 years ago.
patch to allow any SMTP port

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by bde3@…

patch to allow any SMTP port

comment:1 Changed 9 years ago by SmileyChris

  • milestone set to 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/mail.py:

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/global_settings.py to reflect this new functionality.

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 9 years ago by adrian

  • milestone Version 0.92 deleted

Milestone Version 0.92 deleted

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