SMTP
Oli Schacher
python at lists.wgwh.ch
Fri Aug 7 03:13:04 EDT 2009
Sarmad George schrieb:
> msg = "Hello World"
Your sending your message without any headers (no subject etc). So
probably your message lands in the recipients spam folder.
Try:
msg = """To: recipient at example.com
Subject: hello world
Hello there"""
The blank line between the headers and the body is important!
Also make sure to use a sender address that is allowed to send through
your smtp relay. yahoo.com sender is probably a bad idea. Check your
Yahoo Inbox, you might even have a bounce message there telling you that
the final mail server didn't accept your message.
More information about the Python-list
mailing list