On Tue, Apr 22, 2008 at 6:06 AM, Stephen Nelson-Smith &lt;<a href="mailto:sanelson@gmail.com">sanelson@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
smtpserver = &#39;<a href="http://relay.clara.net" target="_blank">relay.clara.net</a>&#39;<br>
<br>
RECIPIENTS = [&#39;<a href="mailto:sanelson@gmail.com">sanelson@gmail.com</a>&#39;]<br>
SENDER = &#39;<a href="mailto:alerts@atalanta-systems.com">alerts@atalanta-systems.com</a>&#39;<br>
message = &quot;&quot;&quot;Subject: HTTPD ALERT: %s requests %s connections<br>
Please investigate ASAP.&quot;&quot;&quot; % (rps, connections)<br>
<br>
This sends emails....<br>
<br>
But gmail says it came from &quot;unknown sender&quot;</blockquote><div>&nbsp;</div><div>You have to include the From and To headers in the message body as well as passing them to sendmail(). See the example here:<br>
<a href="http://docs.python.org/lib/SMTP-example.html">http://docs.python.org/lib/SMTP-example.html</a><br><br>Kent <br></div></div>