![]() |
|
Cant send email using smtp with port 26 - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Python (https://sinister.ly/Forum-Python) +--- Thread: Cant send email using smtp with port 26 (/Thread-Cant-send-email-using-smtp-with-port-26) |
Cant send email using smtp with port 26 - yuyboy - 07-10-2014 I try to send email using SMTP with port 25 but after some hours the port 25 blocked. Then i try using port 26 but it dosn't work. It can't send email. code: Code: from smtplib import SMTP
import datetime
debuglevel = 0
smtp = SMTP()
smtp.set_debuglevel(debuglevel)
smtp.connect('mail.ommmbot.com', 26)
smtp.login('support@ommmbot.com', '*******')
from_addr = "Support <support@ommmbot.com>"
to_addr = "squ106595@gmail.com"
subj = "hello"
date = datetime.datetime.now().strftime( "%d/%m/%Y %H:%M" )
message_text = "Hello\\nThis is a mail from your server\\n\\nBye\\n"
msg = "From: %s\\nTo: %s\\nSubject: %s\\nDate: %s\\n\\n%s" \
% ( from_addr, to_addr, subj, date, message_text )
smtp.sendmail(from_addr, to_addr, msg)
smtp.quit()RE: Cant send email using smtp with port 26 - The Real Slim Shady - 07-10-2014 Have you verified that the smtp server is working correctly and accepting connections? Cause if its not, no amount of scripting will fix it on your end. RE: Cant send email using smtp with port 26 - yuyboy - 07-10-2014 (07-10-2014, 01:36 AM)Geoff Wrote: Have you verified that the smtp server is working correctly and accepting connections? Cause if its not, no amount of scripting will fix it on your end. The smtp server is working as well & the connections accepting. The email was sent but i dont receive the email. RE: Cant send email using smtp with port 26 - lady_godiva - 07-10-2014 Is that email server yours? If so is it running on localhost? |