<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Jules,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">All I did was create the new email template, added a new function to the NSSDropbox.php file (see below) based on the existing deliverEmail function, then changed the NSSDropoff.php file to use the new function
 and new template.&nbsp; I did not embed/attach the image files, just set the URL in the HTML template.&nbsp; There are more sophisticated ways to send HTML email, but the Mail function has the basics to get the job done.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;background:white">
<em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070">/*!</span></em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070"><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;@function deliverEmailHTML</span></em><o:p></o:p></span></p>
<p style="mso-margin-top-alt:7.5pt;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;background:white;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;word-spacing:0px">
<em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070">&nbsp; &nbsp;Send the $content of in an HTML formatted email message to (one or more) address(es) in&nbsp;$toAddr.</span></em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070"><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">*/</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">public function deliverEmailHTML(</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$toAddr,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$fromAddr,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$subject,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$content,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$headers = &quot;&quot;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">)</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">{</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">// If it contains any characters outside 0x00-0x7f, then encode it</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">if (preg_match('/[^\x00-\x7f]/', $subject)) {</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$subject = &quot;=?UTF-8?B?&quot;.base64_encode(html_entity_decode($subject)).&quot;?=&quot;;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">}</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">if (preg_match('/[^\x00-\x7f]/', $fromAddr)) {</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$fromAddr = &quot;=?UTF-8?B?&quot;.base64_encode(html_entity_decode($fromAddr)).&quot;?=&quot;;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">}</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">if (preg_match('/[^\x00-\x7f]/', $this-&gt;_emailSenderAddr)) {</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$sender = &quot;=?UTF-8?B?&quot;.base64_encode(html_entity_decode($this-&gt;_emailSenderAddr)).&quot;?=&quot;;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">} else {</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$sender = $this-&gt;_emailSenderAddr;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">}</span></em><o:p></o:p></span></p>
<p style="mso-margin-top-alt:7.5pt;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;background:white;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;word-spacing:0px">
<em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070">// Add the From: and Reply-To: headers if they have been supplied.</span></em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070"><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">if ($fromAddr!=&quot;&quot;) {</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$headers = sprintf(&quot;From: %s&quot;, $sender) . PHP_EOL .</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;&nbsp; &nbsp;sprintf(&quot;Reply-to: %s&quot;, $fromAddr) . PHP_EOL .</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;&nbsp; &nbsp;$headers;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">}</span></em><o:p></o:p></span></p>
<p style="mso-margin-top-alt:7.5pt;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;background:white;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;word-spacing:0px">
<em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070">// Add the MIME headers for 8-bit UTF-8 encoding</span></em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070"><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">$headers .= &quot;MIME-Version: 1.0&quot;.PHP_EOL;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">$headers .= &quot;Content-type: text/html; charset=iso-8859-1&quot;.PHP_EOL;</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">$headers .= &quot;Content-Transfer-Encoding: 8bit&quot;.PHP_EOL;</span></em><o:p></o:p></span></p>
<p style="mso-margin-top-alt:7.5pt;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;background:white;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;word-spacing:0px">
<em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070">return mail(</span></em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#707070"><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$toAddr,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$subject,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$content,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;$headers // JKF Commented out for now due to security concerns ,</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp;// JKF Commented out for now due to security concerns</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp; // '-f &quot;'.$fromAddr.'&quot;'</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">&nbsp; &nbsp; );</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,sans-serif">}</span></em><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--- Karl<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> zendto-bounces@zend.to [mailto:zendto-bounces@zend.to]
<b>On Behalf Of </b>Jules<br>
<b>Sent:</b> Wednesday, March 08, 2017 11:19 AM<br>
<b>To:</b> ZendTo Users &lt;zendto@zend.to&gt;<br>
<b>Subject:</b> Re: [ZendTo] Use different AD attribute<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Karl,<br>
<br>
Yes, I agree this would be nice. I basically haven't had time to sort it all out. As I need to make the message a multipart MIME structure, the email templates get a *lot* more complicated.<br>
<br>
What did you have to change except for any templates/*.tpl files?<br>
Any changes you make to the *.tpl files will <b>not</b> be overwritten when you upgrade later.<br>
<br>
So any hints you've got as to what I need to change in order to support the massively more complex MIME messages, please do let me know.<br>
<br>
Thanks!<br>
Jules.<br>
<br>
<span style="font-size:12.0pt"><o:p></o:p></span></p>
<div>
<p class="MsoNormal">On 22/02/2017 16:58, Karl Bundy wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><span style="font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">Jules,</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">&nbsp;</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">Thanks for all of your ongoing work on ZendTo, it has been a huge benefit for our team, and to the whole user community!&nbsp; </span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">&nbsp;</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">A feature request that I would love to see is the option for HTML formatted email notices.&nbsp; They give a bit of polish to the system and oddly enough seem to give our users a bit more confidence in the system.&nbsp; I have hacked our instance to send HTML formatted emails (see screenshot below) and I while what I have works fine, it would be great if this type of functionality was built-in to the system so that I don&#8217;t have to add back this functionality anytime we do upgrades.</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">&nbsp;</span><o:p></o:p></pre>
<pre><img width="378" height="561" id="Picture_x0020_1" src="cid:image001.jpg@01D29800.1A50F1A0"><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">&nbsp;</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">Thanks,</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">&nbsp;</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">Karl</span><o:p></o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>ZendTo mailing list<o:p></o:p></pre>
<pre><a href="mailto:ZendTo@zend.to">ZendTo@zend.to</a><o:p></o:p></pre>
<pre><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a><o:p></o:p></pre>
</blockquote>
<pre>Jules<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>-- <o:p></o:p></pre>
<pre>Julian Field MEng MBCS CITP CEng<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>'Once is happenstance, twice is coincidence, three times is enemy<o:p></o:p></pre>
<pre> action.' - Ian Fleming<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre><a href="http://www.Zend.To">www.Zend.To</a><o:p></o:p></pre>
<pre>Twitter: @JulesFM<o:p></o:p></pre>
<pre>PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654<o:p></o:p></pre>
</div>
</body>
</html>