I am trying to build an HTML body text for an email using a docstring with variables inserted a certain points.  It all works just fine, except that the first instance of the variable &quot;pecn&quot; in the HTML link does not get inserted into the text.  The second instance of &quot;pecn&quot; gets inserted ok into that HTML link.   What is the right way to do this or is there a better way in general?<br>
<br>This my code:<br><br>pecn = &quot;5022543&quot;<br>pecn_project = &quot;F876540&quot;<br>pdesc = &quot;some sort of ECN for who knows what reason!&quot;<br><br>newMail.HTMLBody = &quot;&quot;&quot;<br>&lt;pre&gt;<br>ECN number &quot;&quot;&quot;+pecn+&quot;&quot;&quot; on Project &quot;&quot;&quot;+pecn_project+&quot;&quot;&quot; has been closed.<br>
Below is a link to the ECN on the intranet.<br>&lt;a href=&quot;<a href="http://web_server_at_work.com/cgi-bin/part-url.cgi?ecn=">http://web_server_at_work.com/cgi-bin/part-url.cgi?ecn=</a>&quot; &quot;&quot;&quot;+pecn+&quot;&quot;&quot; &quot;&quot;&gt;&quot;&quot;&quot;+pecn+&quot;&quot;&quot;&lt;/a&gt;<br>
ECN Description:<br>&quot;&quot;&quot;+pdesc+&quot;&quot;&quot;<br><br>ECN Effect of Change Comments:<br>    (still need to work on this part)<br><br>R&amp;D Information:<br>    (still need to work on this part)<br>&lt;/pre&gt;<br>
&quot;&quot;&quot;<br><br>