<br><br><div class="gmail_quote">On Sat, Aug 21, 2010 at 11:27 PM, Hugo Arts <span dir="ltr">&lt;<a href="mailto:hugo.yoshi@gmail.com">hugo.yoshi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
<br>
</div>The variable is inserted just fine for me, though there&#39;s some<br>
problems with the &lt;a&gt; tag, because you shouldn&#39;t surround GET<br>
variables with quotation marks, e.g. you should do this:<br>
<br>
<a href="http://example.com/?ecn=423434" target="_blank">http://example.com/?ecn=423434</a><br>
NOT this:<br>
<a href="http://example.com/?ecn=" target="_blank">http://example.com/?ecn=</a>&quot;423434&quot;<br>
<br>
If you do this, the HTML parser will encounter the first &quot;, think that<br>
it&#39;s come to the end of the href=&quot;&quot; attribute, and ignore the rest.<br>
But that&#39;s an HTML issue, not a python one.<br>
<br>
As an aside, consider using string formatting operations like so:<br>
<br>
newMail.HTMLBody = &quot;&quot;&quot;<br>
&lt;pre&gt;<br>
ECN number {0} on Project {1} has been closed.<br>
<div class="im">Below is a link to the ECN on the intranet.<br>
</div>&lt;a href=&quot;<a href="http://web_server_at_work.com/cgi-bin/part-url.cgi?ecn=%7B0%7D" target="_blank">http://web_server_at_work.com/cgi-bin/part-url.cgi?ecn={0}</a>&quot;&gt;{0}&lt;/a&gt;<br>
ECN Description:<br>
{2}&quot;&quot;&quot;.format(pecn, pecn_project, pdesc)<br>
<font color="#888888"><br>
<br></font></blockquote><div>Hugo,<br><br>Thank you for the reminder of the problem with the HTML.  I see that now.  You are right, however, using that format method works wonderfully and is definitely the way to go!   I see how I can apply that in lots of ways.<br>
<br>Thanks for the help,<br>Bill<br><br></div></div><br>