Hi gang,
I am using phpmailer to send some mail notifications in an intranet
I've made. This is a sample code:
<?php
// Include PHP Mailer
require 'class/class.phpmailer.php';
// Instantiate the mailer
$e = new phpmailer();
$e->From = "acount@xxxxxxx";
$e->FromName = "Test";
$e->Mailer = "mail";
$e->Subject = "This is δφκξγκδφη garbidge κηδφκξγσ";
$e->CharSet = "UTF-8";
$e->Body = "H εργασία id: 122 έκλεισε με σχόλια.";
$e->AddReplyTo("support@xxxxxxxxxx");
$e->AddAddress("tgol@xxxxxxxxxx");
// $e->to = array("tgol@xxxxxxxxxx");
if ($e->Send()) {
print "Mail has been sent successfully.";
} else {
print "Failed to send mail.<br>".$e->ErrorInfo;
}
?>
Where mailer class is:
<?php
require 'class.phpmailer.php';
class mailer extends phpmailer {
var $From = "acount@xxxxxxx";
var $FromName = "Test";
var $Mailer = "mail";
var $WordWrap = 200;
var $CharSet = "UTF-8";
var $Encoding = "quoted-printable";
// var $Encoding = "base64";
}
?>
This script seems to work ok in a freebsd development server I have but
a linux production machine breaks the subject's encoding for some
unexpected reason. The subject has a mix of English and Greek characters
that FreeBSD seems to handle like a charm.
Both machines have the same php version (5.2.9) and the scripts encoding
is UTF-8. Iconv and mbstring are configured the same way in php.ini
(although I am not aware whether phpmailer uses iconv or mbstring).
Has anyone had a similar experience? Is it possible that sendmail (which
is the underlying tool) breaks the mail encoding?
Please any help would be appreciated because this is really driving me
crazy.
--
Thodoris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php