Have you tried rewinding the stringio with .seek(0,0) first?<br><br>Stephen<br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 21:34, Laurens Van Houtven <span dir="ltr">&lt;_@lvh.cc&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey,<br><br><br>I&#39;ve hacked some code together based on smtpclient_tls.py and radix&#39;s article on how to send e-mail: <a href="http://radix.twistedmatrix.com/2010/07/how-to-send-good-unicode-email-with.html" target="_blank">http://radix.twistedmatrix.com/2010/07/how-to-send-good-unicode-email-with.html</a><br>


<br>Here&#39;s what I&#39;ve come up with: <a href="http://paste.pocoo.org/show/487918/" target="_blank">http://paste.pocoo.org/show/487918/</a><br><br>The e-mail arrives, but it&#39;s as if the body is empty. The from address is wrong (it uses my login email), there&#39;s no subject, no body... I&#39;ve pointed my debugger at the problem, but the repr looks pretty okay: <br>


<br>&#39;Content-Type: multipart/alternative;\n boundary=&quot;===============6076587290379738777==&quot;\nMIME-Version: 1.0\nSubject: Content Access\nTo: _@lvh.cc\nFrom: <a href="mailto:dc83518c-4eea-447f-a9d8-29e29022e6f8@myotherdomain.com" target="_blank">dc83518c-4eea-447f-a9d8-29e29022e6f8@myotherdomain.com</a>\n\n--===============6076587290379738777==\nMIME-Version: 1.0\nContent-Type: text/html; charset=&quot;utf-8&quot;\nContent-Transfer-Encoding: quoted-printable\n\n&lt;html&gt;\n&lt;body&gt;\nOh hello!!!!!\n&lt;/body&gt;\n&lt;/html&gt;\n--===============6076587290379738777==\nMIME-Version: 1.0\nContent-Type: text/plain; charset=&quot;utf-8&quot;\nContent-Transfer-Encoding: quoted-printable\n\n\nOh hello!!!!!\n\n--===============6076587290379738777==--&#39;<br>


<br clear="all">How do I go about debugging this further?<br><br><br>cheers<div>lvh</div><font color="#888888"><br>
</font><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>