DownloadMail Plugin Question: Multiple email accounts

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/

By affinitymc - August 19, 2010

Thanks Jason, another worry off my mind [:)]

I assume that this code gets inserted just before:

<?php echo $record['html'] ?>
and is surrounded by its own <?php...?>
Thanks
Brian

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/