DownloadMail Plugin Question: Multiple email accounts

By affinitymc - August 18, 2010 - edited: August 18, 2010

Thanks Jason, it's working now. I also discovered that the email address was held in double quotes "email@" in the database. So rather than use the 'to' field, I switched it to the 'account' field and got it working.

I am now trying to figure out how to ensure that the body of the email message does not get posted twice, as plain text and html, even though the original email was sent as html.

Another puzzling side effect is that the two php files I am testing with (calgary.php and newsletterarchives.php) are ignoring the css class for hyperlinks and rendering hyperlinks as plain blue underlined, whereas the css file has the class as grey underlined, which renders okay on all the other pages on the site.

By agrassoh - August 19, 2010

Nice Post,

Thanks Jason.

Re: [affinitymc] DownloadMail Plugin Question: Multiple email accounts

By affinitymc - August 19, 2010 - edited: August 19, 2010

The hyperlink formatting problem noted above was being caused by code in the HTML email. For now I am asking my client to use plain text emails until I figure out a solution. Which raises another question: how secure is this plugin when used to post info to a website via HTML email?

Re: [affinitymc] DownloadMail Plugin Question: Multiple email accounts

By Jason - August 19, 2010

Hi,

The plugin is quite secure. The code used to write any information to the database is "escaped" to prevent SQL insertion attacks.

If you're worried about javascript being inserted into your HTML message, you can strip it out when you display it using code like this:

echo preg_replace('@<script[^>]*?>.*?</script>@si', '',$record['html']);

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [affinitymc] DownloadMail Plugin Question: Multiple email accounts

By Jason - August 19, 2010

Hi Brian,

All you need is this code:

echo preg_replace('@<script[^>]*?>.*?</script>@si', '',$record['html']);

It will strip any <script> tags out of $record['html'] and then echo the results.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/