<br><br><div class="gmail_quote">On 16 May 2012 17:04, Sarma Tangirala <span dir="ltr">&lt;<a href="mailto:tvssarma.omega9@gmail.com" target="_blank">tvssarma.omega9@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Walter,<br><br><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div>All the headers in the MimeText object needs to be strings.  You can&#39;t directly pass a list object containing multiple recipients to the &quot;To&quot; header of your MimeText object on line 31 in your code, and expect it to work.  You&#39;ve got to instead first convert the list to valid string and assign that instead, as that&#39;s what the MimeText object expects.  You can infer this from your error messages since lstrip() is a string method, and the code is (rightly) complaining that a list doesn&#39;t have an lstrip() method, which is understandable becuase you&#39;re getting the error when you pass a list as parameter.  <br>



<br></blockquote><div><br></div></div><div>Thank you for clearing that. Stupid mistake here. I forgot to change the variable names.</div><div><br></div><div>But I do have another question. Maybe this is a misunderstanding about the MimeText type, but why does MimeText care about the To field when the actually sending is being done by SMTP? </div>



</div><div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>OK. That was a stupid question. Sorry for the noise. Please ignore.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5"><br clear="all"><div><br></div>-- <br>Sarma Tangirala,<div><div>Class of 2012,</div><div>Department of Information Science and Technology,</div><div>College of Engineering Guindy - Anna University</div>

</div><br>


</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Sarma Tangirala,<div><div>Class of 2012,</div><div>Department of Information Science and Technology,</div><div>College of Engineering Guindy - Anna University</div>

</div><br>