I get this error:
raise SMTPRecipientsRefused (senderrs) smtplib.SMTPRecipientsRefused: {' example@hotmail.com ': (550, '5.1.1: Recipient address rejected: hotmail.com')}
when trying to run my python script.
No matter what recipient address I insert, it will still give me the same error. I have a postfix configuration set as local, and it correctly recognizes "localhost", but not any of the sender addresses. This is my code:
import smtplib def sendEmail(addressFrom, addressTo, msg): server = smtplib.SMTP('localhost') server.set_debuglevel(1) server.sendmail(addressFrom, addressTo, msg) server.quit() msg = "This is the content of the email" addressFrom = "" addressTo = " example@hotmail.com " sendEmail(addressFrom, addressTo, msg)
And this is the main.cf file for the postfix. Looking at it now, mydestination is set only to local addresses, maybe a problem?
Thank you in advance
source share