Page 1 of 1

Send email notifications with proper charset encoding

Posted: Sat Sep 27, 2008 10:19 pm
by tonecas
/*************************************
Title: GBook
Version: 1.6
Author: Antonio Vaz
Short description: Send notification emails with correct encoding


*************************************/

Hi,

if you want to receive emails notifying you of new posts but you are using language/encondings that are non english/non ascii based, then set your encoding to UTF-8 on your language file :

$lang['enc']='utf-8';


and change this in gbook.php:

mail("$settings[admin_email]",$lang['t41'],$message);

to

$headers = 'Content-type: text/plain; charset='.$lang['enc']."\r\n";
mail("$settings[admin_email]",$lang['t41'],$message, $headers);

regards,
tonecas