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.

eZ debug

Timing: Jan 18 2025 21:08:40
Script start
Timing: Jan 18 2025 21:08:40
Module start 'layout'
Timing: Jan 18 2025 21:08:40
Module start 'content'
Timing: Jan 18 2025 21:08:41
Module end 'content'
Timing: Jan 18 2025 21:08:41
Script end

Main resources:

Total runtime0.7289 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.7813152.6094
Module start 'layout' 0.00630.0036 740.390639.3984
Module start 'content' 0.00990.7175 779.7891523.5078
Module end 'content' 0.72740.0014 1,303.29698.2031
Script end 0.7288  1,311.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4350160.0002
Check MTime0.00140.1873160.0001
Mysql Total
Database connection0.00060.088510.0006
Mysqli_queries0.682293.6014540.0126
Looping result0.00060.0769520.0000
Template Total0.693795.220.3469
Template load0.00240.322420.0012
Template processing0.691394.852620.3457
Template load and register function0.00020.023210.0002
states
state_id_array0.00120.162210.0012
state_identifier_array0.00110.146720.0005
Override
Cache load0.00190.2626190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.084120.0003
Fetch class attribute name0.00090.123130.0003
XML
Image XML parsing0.00050.074520.0003
class_abstraction
Instantiating content class attribute0.00000.001130.0000
General
dbfile0.00070.0950160.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs