On Tue, Apr 22, 2008 at 6:06 AM, Stephen Nelson-Smith <[EMAIL PROTECTED]>
wrote:

> smtpserver = 'relay.clara.net'
>
> RECIPIENTS = ['[EMAIL PROTECTED]']
> SENDER = '[EMAIL PROTECTED]'
> message = """Subject: HTTPD ALERT: %s requests %s connections
> Please investigate ASAP.""" % (rps, connections)
>
> This sends emails....
>
> But gmail says it came from "unknown sender"


You have to include the From and To headers in the message body as well as
passing them to sendmail(). See the example here:
http://docs.python.org/lib/SMTP-example.html

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to