<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> </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. I did not embed/attach the image files, just set the URL in the HTML template. 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> </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:"Arial",sans-serif;color:#707070">/*!</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#707070"><br>
<em><span style="font-family:"Arial",sans-serif"> @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:"Arial",sans-serif;color:#707070"> Send the $content of in an HTML formatted email message to (one or more) address(es) in $toAddr.</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#707070"><br>
<em><span style="font-family:"Arial",sans-serif">*/</span></em><br>
<em><span style="font-family:"Arial",sans-serif">public function deliverEmailHTML(</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $toAddr,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $fromAddr,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $subject,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $content,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $headers = ""</span></em><br>
<em><span style="font-family:"Arial",sans-serif">)</span></em><br>
<em><span style="font-family:"Arial",sans-serif">{</span></em><br>
<em><span style="font-family:"Arial",sans-serif">// If it contains any characters outside 0x00-0x7f, then encode it</span></em><br>
<em><span style="font-family:"Arial",sans-serif">if (preg_match('/[^\x00-\x7f]/', $subject)) {</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $subject = "=?UTF-8?B?".base64_encode(html_entity_decode($subject))."?=";</span></em><br>
<em><span style="font-family:"Arial",sans-serif">}</span></em><br>
<em><span style="font-family:"Arial",sans-serif">if (preg_match('/[^\x00-\x7f]/', $fromAddr)) {</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $fromAddr = "=?UTF-8?B?".base64_encode(html_entity_decode($fromAddr))."?=";</span></em><br>
<em><span style="font-family:"Arial",sans-serif">}</span></em><br>
<em><span style="font-family:"Arial",sans-serif">if (preg_match('/[^\x00-\x7f]/', $this->_emailSenderAddr)) {</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $sender = "=?UTF-8?B?".base64_encode(html_entity_decode($this->_emailSenderAddr))."?=";</span></em><br>
<em><span style="font-family:"Arial",sans-serif">} else {</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $sender = $this->_emailSenderAddr;</span></em><br>
<em><span style="font-family:"Arial",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:"Arial",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:"Arial",sans-serif;color:#707070"><br>
<em><span style="font-family:"Arial",sans-serif">if ($fromAddr!="") {</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $headers = sprintf("From: %s", $sender) . PHP_EOL .</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> sprintf("Reply-to: %s", $fromAddr) . PHP_EOL .</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $headers;</span></em><br>
<em><span style="font-family:"Arial",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:"Arial",sans-serif;color:#707070">// Add the MIME headers for 8-bit UTF-8 encoding</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#707070"><br>
<em><span style="font-family:"Arial",sans-serif">$headers .= "MIME-Version: 1.0".PHP_EOL;</span></em><br>
<em><span style="font-family:"Arial",sans-serif">$headers .= "Content-type: text/html; charset=iso-8859-1".PHP_EOL;</span></em><br>
<em><span style="font-family:"Arial",sans-serif">$headers .= "Content-Transfer-Encoding: 8bit".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:"Arial",sans-serif;color:#707070">return mail(</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#707070"><br>
<em><span style="font-family:"Arial",sans-serif"> $toAddr,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $subject,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $content,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> $headers // JKF Commented out for now due to security concerns ,</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> // JKF Commented out for now due to security concerns</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> // '-f "'.$fromAddr.'"'</span></em><br>
<em><span style="font-family:"Arial",sans-serif"> );</span></em><br>
<em><span style="font-family:"Arial",sans-serif">}</span></em><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </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> </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 <zendto@zend.to><br>
<b>Subject:</b> Re: [ZendTo] Use different AD attribute<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </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:"Calibri",sans-serif;color:windowtext">Jules,</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> </span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",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! </span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> </span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">A feature request that I would love to see is the option for HTML formatted email notices. They give a bit of polish to the system and oddly enough seem to give our users a bit more confidence in the system. 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’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:"Calibri",sans-serif;color:windowtext"> </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:"Calibri",sans-serif;color:windowtext"> </span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">Thanks,</span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> </span><o:p></o:p></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",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> </o:p></pre>
<pre>-- <o:p></o:p></pre>
<pre>Julian Field MEng MBCS CITP CEng<o:p></o:p></pre>
<pre><o:p> </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> </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>