Mail Not Being Received With Python Smtp
Hello I am trying to make python 3 send a simple email from Ubuntu. I started a simple smpt server with: python -m smtpd -n -c DebuggingServer localhost:1025 The following is the c
Solution 1:
Your message does not have any headers. Or more precisely, your message contains only headers, none of which will be recognized as valid. At the very least you probably want to add Subject, From, and To headers. E.g.
sender = "dancbtalk@yahoo.com"
receivers = ["dancbtalk@yahoo.com"]
headers = f"""From: {sender}
To: {", ".join(receivers)}
Subject: Hello
"""
message = headers + "\n" + """
Hello
"""
Post a Comment for "Mail Not Being Received With Python Smtp"