HTML Summary eMail

Users tips and ideas

Moderators: FlorianB, Pascal, bourgeois, mentor

joe.davis
Posts: 9
Joined: Fri Jan 04, 2008 7:34 pm

HTML Summary eMail

Postby joe.davis » Fri Jan 04, 2008 7:52 pm

I wanted the Quarantine Summary to display the quarantined messages in a table for a more presentable message.

To transform your Quarantine Summary eMail to HTML add the following to the top of the summary.txt file:

Code: Select all

Content-Type: text/html;
Content-Transfer-Encoding: 7bit;

Then replace all line-breaks with <br /> and create your table!

I spent a few hours banging my head against the wall because MS-Outlook would not display the email properly. Outlook was removing the first two characters after every "=" in the email. It turns out that the cause is a statement on line 412 of the send_summary.pl script:

Code: Select all

          $smtp->datasend("Content-Transfer-Encoding: quoted-printable\n");

There really is nothing wrong with the statement above IF your email is going to remain plain text. The quoted-printable Content-Transfer-Encoding is explained here http://www.freesoft.org/CIE/RFC/1521/6.htm.

I hope this helps someone.
Joe
pfigg
Posts: 3
Joined: Sun May 04, 2008 1:43 am

Postby pfigg » Tue Jun 10, 2008 1:18 am

Joe,

I had the problem where the url for the force message tag would not come through as an embedded link for users using Outlook. Instead, it would only come through as text that we were telling the users to cut and past into a browser (there's a hack) to get to force the email. I corrected the problem by changing the summary.txt file to do the things you mentioned above, plus we added the html tags for

<a href="??FORCEURL/fm.php?id=??ID&a=??ADDRESS&s=??STOREID&lang=??LANGUAGE">??FORCEURL/fm.php?id=??ID&a=??ADDRESS&s=??STOREID&lang=??LANGUAGE </a><br />

We also had to remove all the references to "3D" that were in the forceurl line as they got mangled when the smtp-datasend function ran the message body.

The rest we left as you mentioned above.

The result was that the email came out as encoded html text, plus the embedded url was put into each row of the table for the user to click on when using Outlook.

Regards,
Phillip
joe.davis
Posts: 9
Joined: Fri Jan 04, 2008 7:34 pm

Postby joe.davis » Tue Jun 10, 2008 11:33 pm

So everything is working properly or no?

-Joe
pfigg
Posts: 3
Joined: Sun May 04, 2008 1:43 am

Re: HTML Summary eMail

Postby pfigg » Fri Jul 04, 2008 1:36 pm

Yes, everything works fine now. The users actually see an embedded link that they can click on to force the message through. And that was the main intent.

-- Phillip --

Return to “Tips”

Who is online

Users browsing this forum: No registered users and 1 guest