Sendmail without password authentication (Python 2.4)
How can开发者_JAVA百科 I sendmail from Python 2.4
without any password authentication?
Look at the smptlib example:
http://docs.python.org/library/smtplib.html
There is no documentation telling you that authentication would be mandatory.
Authentication is optional.
You need to configure your mail server to allow unauthenticated relaying from the IP running your python code (e.g. 127.0.0.1 if it's the same system).
However, ensure that you do not allow relaying for the world - otherwise your server will be throwing SPAM emails around and get blacklisted for it soon.
精彩评论