Page 1 of 1

Email: Replacing plain text with html

Posted: 31 Aug 2007, 17:31
by danich
In core/email_api.php around line 745
there's a line that says :

Code: Select all

$mail->IsHTML( false );
change the value for "true" and mail will be sent in html code.
You should replace all the "\n" for "<br/>".
You can also change font, color, etc, you should start the html tag in the strings_english.txt file, more specificaly in all the "$s_email_notification_title" vars.
The tags should be closed in email_api.php, in the line where it says:

Code: Select all

$t_message .= $t_email_separator1 . " \n\n";
for example:

Code: Select all

$t_message .= $t_email_separator1 . " <br/><br/></font>";
That's it !

Re: Email: Replacing plain text with html

Posted: 22 Jun 2010, 16:37
by tetsunami
centanly this way works but viewing the source code of the sent mail i fount a tag
<td class="normal">

so im asking if theres a css style sheet in mantis for the e mail
in order to avoid the futures tag by tag change :D

Re: Email: Replacing plain text with html

Posted: 13 Jun 2013, 23:12
by dtamajon
I have moved decision to the config_inc.php file by doing:

$g_email_is_html = ON; # or OFF

And modifyng the core/email.php as you proposed, but using the config variable:

$mail->IsHTML( config_get( 'email_is_html' ) );

I hope find we can find such configuration in proper versions... when using BBCode or other formating plugin's, it's annoying receiving plain text e-mails with HTML tags.

Thanks!!!

Re: Email: Replacing plain text with html

Posted: 14 Jun 2013, 06:44
by atrol