I have a simple SMTP client in python:
import smtplib
import ssl
if __name__ == "__main__":
smtp_server = "smtp.server.ip.addr"
port = 111
password = "my_password"
username = "my@email.com"
context = ssl._create_unverified_context()
receiver_email = "my_recipient@gmail.com"
message = "Hi"
try:
server = smtplib.SMTP(smtp_server, port)
server.starttls(context=context)
server.login(username, password)
server.sendmail(username, receiver_email, message)
server.quit()
except Exception as e:
print(e)
But I get following error on sendmail
function call:
(550, b'5.7.0 Authentication rejected')
As I have read the library, it means one of the recipients is rejected, but I can't understand why; since it's a valid email address which I am currently and actively using.