Zitat:
Zitat von ulle
Das es möglich ist habe ich jetzt häufiger gelesen, aber gerade im PEAR-Package Mail habe ich bisher nichts gefunden. Auch die PHP-Funktion mail() gab nocht nicht viel aufschluß.
Ergo kann man UTF-8 Mails versenden und als solche Empfangen. Wenn mir noch jemand verraten könnte wie ich beim Senden vorgehe.
|
Btw, ne bekannte Kneipe hier in Berlin heisst "Bibo ergo sum"...
Hier mein Vorgehen mit Pear:
$crlf = "\n"; // our server is running on linux
$mimiMail = new Mail_mime($crlf);
$mimiMail->setTXTBody($txtBody.$individualUnregisterPlain) ;
$mimiMail->setHTMLBody($completeHtmlBody);
$mimiMail->setFrom($fromAdress);
$mimiMail->setSubject($subject);
$mimiBody = $mimiMail->get(array('text_charset' => 'iso-8859-1'));
$hdr = $mimiMail->headers();
$mail =& Mail::factory("mail");
$pearError = $mail->send($toAdress, $hdr, $mimiBody);
....
Vorsicht, get mit parametern habe ich noch nicht getestet, sollte aber so funktionieren. Siehe auch den head comment in mimi.php, line 440 wie folgt
/**
* Builds the multipart message from the list ($this->_parts) and
* returns the mime content.
*
* @param array Build parameters that change the way the email
* is built. Should be associative. Can contain:
* text_encoding - What encoding to use for plain text
* Default is 7bit
* html_encoding - What encoding to use for html
* Default is quoted-printable
* 7bit_wrap - Number of characters before text is
* wrapped in 7bit encoding
* Default is 998
* html_charset - The character set to use for html.
* Default is iso-8859-1
* text_charset - The character set to use for text.
* Default is iso-8859-1
* head_charset - The character set to use for headers.
* Default is iso-8859-1
* @return string The mime content
* @access public
*/
function &get($build_params = null)
[.. snip ..]