Thanks Mike, it seems that I&#39;ll be easy to incorporate that into my script as well. <br><br>I&#39;ll give it a try. I&#39;m still open to other suggestions, though.<br><br><div><span class="gmail_quote">On 5/23/07, <b class="gmail_sendername">
Mike Hansen</b> &lt;<a href="mailto:Mike.Hansen@atmel.com">Mike.Hansen@atmel.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>&gt; -----Original Message-----<br>&gt; From: <a href="mailto:tutor-bounces@python.org">tutor-bounces@python.org</a><br>&gt; [mailto:<a href="mailto:tutor-bounces@python.org">tutor-bounces@python.org</a>] On Behalf Of Daniel McQuay
<br>&gt; Sent: Wednesday, May 23, 2007 1:49 PM<br>&gt; To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>&gt; Subject: [Tutor] smtplib howto send with a subject line<br>&gt;<br>&gt; Hey Guys, I&#39;m having a problem with my script that sends out
<br>&gt; an email using smtplib. Whats happening now is when it is<br>&gt; send I get a (no subject) where the subject line should be. I<br>&gt; checked a few places such as effbot and some other online doc<br>&gt; but couldn&#39;t find any thing about the subject line.
<br>&gt;<br>&gt; Any help would be much appreciated.<br>&gt;<br>&gt; ###################################<br>&gt; #Created by: Daniel McQuay<br>&gt; #This script will send and email<br>&gt; #to verify if the backup was<br>
&gt; #successful or not.<br>&gt; ###################################<br>&gt;<br>&gt; import smtplib<br>&gt; import sys<br>&gt;<br>&gt; emmssg = &quot;/tmp/backup.log&quot;<br>&gt; smtpserver = &#39;localhost&#39;<br>&gt; AUTHREQUIRED = 0
<br>&gt; smtpuser = &#39;&#39;<br>&gt; smtppass = &#39;&#39;<br>&gt;<br>&gt; #Recipients who will be getting the emails<br>&gt; RECIPIENTS = [&#39;<a href="mailto:simplebob@gmail.com">simplebob@gmail.com</a>&#39;]<br>&gt;
<br>&gt; SENDER = &#39;Saint_Richards&#39;<br>&gt;<br>&gt; #This does not work?<br>&gt; SUBJECT = &#39;Backup_Log&#39;<br>&gt;<br>&gt; emmssg = open(&#39;/tmp/backup.log&#39;,&#39;r&#39;).read()<br>&gt;<br>&gt; session = 
smtplib.SMTP(smtpserver)<br>&gt; if AUTHREQUIRED:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; session.login(smtpuser, smtppass)<br>&gt; smtpresult = session.sendmail(SENDER, RECIPIENTS, SUBJECT, emmssg)<br>&gt;<br>&gt; if smtpresult:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; errstr = &quot;&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; for recip in smtpresult.keys():<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errstr = &quot;&quot;&quot;Could not delivery mail to: %s<br>&gt;<br>&gt; Server said: %s<br>&gt; %s<br>&gt;<br>&gt; %s&quot;&quot;&quot; % (recip, smtpresult[recip][0], smtpresult[recip][1], errstr)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; raise smtplib.SMTPException, errstr<br>&gt;<br>&gt; Thanks in advance,<br>&gt;<br>&gt; --<br>&gt; Daniel McQuay<br>&gt; <a href="http://Jaluno.com">Jaluno.com</a><br>&gt; H: 814.825.0847<br>&gt; M: 814-341-9013
<br>&gt;<br><br>It seems a little easier to use the email module along with the smtp<br>module to create and send a message.<br><br><a href="http://docs.python.org/lib/node162.html">http://docs.python.org/lib/node162.html
</a><br><br>Mike<br>_______________________________________________<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Daniel McQuay<br>Linux Jedi<br><a href="http://Jaluno.com">Jaluno.com</a><br>H: 814.825.0847<br>M: 814-341-9013