Login Register


Cant send email using smtp with port 26 filter_list
Author
Message
Cant send email using smtp with port 26 #1
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()

Reply

RE: Cant send email using smtp with port 26 #2
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.

Reply

RE: Cant send email using smtp with port 26 #3
(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.

Reply

RE: Cant send email using smtp with port 26 #4
Is that email server yours? If so is it running on localhost?
Everything is relative

Reply







Users browsing this thread: 1 Guest(s)