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 = "aco...@host.gr";
$e->FromName = "Test";
$e->Mailer = "mail";
$e->Subject = "This is δφκξγκδφη garbidge κηδφκξγσ";
$e->CharSet = "UTF-8";
$e->Body = "H εργασία id: 122 έκλεισε με σχόλια.";


$e->AddReplyTo("supp...@kinetix.gr");
$e->AddAddress("t...@kinetix.gr");
// $e->to = array("t...@kinetix.gr");


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 = "aco...@host.gr";
   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

Reply via email to