EzMail question

Author Message

Carlos Revillo

Monday 24 October 2005 10:18:31 am

Hi. i've made a extension and i use ezmail class to send some mails. all works perfectly. But i want to send messages in html mode, so the receiver can see font colors, underline text, italic text... things like that.

so i'm doing things like this
$mail->setBody("<b>".$data."</b>");

but i get exactly that. <b>data</b>...

any ideas?. thanks.

Bruce Morrison

Monday 24 October 2005 4:18:08 pm

Hi Carlos

The generated email is missing a Content Type heading to tell the email client that the message contains html.

You can rectify this in 2 ways: Add the following to the code that generates the mail

$mail->setContentType( 'text/html' );

or in site.ini.append in the override or siteaccess add "ContentType=text/html" to the MailSettings section:

[MailSettings]
ContentType=text/html

HTH

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.