#1555 closed defect (fixed)
[patch][magic-removal] Fix to allow for sending email on non-standard SMTP ports.
Reported by: | 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: | no | UI/UX: | no |
Description
Fix to allow django.core.mail.send_mail() to work with a non-standard SMTP port. (i.e. not 25)
Attachments (1)
Change History (4)
by , 19 years ago
Attachment: | mail_with_port.diff added |
---|
comment:1 by , 19 years ago
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/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 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
patch to allow any SMTP port