[BNM] sending email from php to gmail including sample javascript code

Andy Lambert andy at theycreate.co.uk
Mon Jul 6 15:02:50 BST 2009


Try htmlentities() to convert the < & > to &lt; &amp; &gt;

AndrewGill73 at gmail.com wrote:
> Hi BNM'ers,
>
> I'd like to send an email from PHP that includes some sample javascript
> code.
> I don't want to run the javascript code, just allow the user to copy & paste
> the javascript code into their website. Example code below:
>
> <script src='http://www.abc.co.uk/47?txt=test&ht=50&bdc=000000&cbc=7195FF
> '></script>
>
> The problem is that Gmail won't display the code - it is received but this
> section is not displayed in gmail. I've tried the following without success:
>
>    - <code>my script </code>
>    - <pre>my script </pre>
>    - <xmp>my script </xmp> (now defunct)
>    - Encoding the script.
>
> I'm sending as Mime-version 1.0 and charset=iso-8859-1.
>
> Any ideas? Much appreciated.
>
> cheers,
> Andy Gill
> www.ChatBadge.com
>   

-- 
---------------------------------------------------------------------------------------

Andy Lambert
They.Create Ltd

100 North Road, Brighton, BN1 1YE
T +44 (0) 1273 248 742  |  M +44 (0) 7723 335 376
andy at theycreate.co.uk   |  http://www.theycreate.co.uk

---------------------------------------------------------------------------------------


They.Create have just launched the website for Media Buying
Agency - Meerkat Works.

http://www.meerkatworks.co.uk 


Registered Office: First Floor, Redington Court, 69 Church Road, Hove, East Sussex, BN3 2BB
Registered in England and Wales 5969226, VAT Number: 897 2419 75



More information about the BNMlist mailing list. Powered by Wessex Networks