mb_send_mail - encoding & multipart message problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
index
Forum Newbie
Posts: 1
Joined: Thu Mar 22, 2007 6:51 am

mb_send_mail - encoding & multipart message problems

Post by index »

How can I solve problem with multipart messages?
When I try to send it throught mb_send_mail I receive damaged message where all parts with their headers located and reflected in body.
I have following lines in my .htaccess:
php_value mbstring.func_overload 1
php_value mbstring.internal_encoding UTF-8
php_value mbstring.http_output UTF-8
php_value mbstring.http_input UTF-8
So my standad function mail() is overloaded by mb_send_mail and encodings is set to UTF-8.
Also i use mb_language('uni');
I pass through mb_send_mail's parameters strings in UTF-8.
In spite of everything I get a problem with encoding of my message.
I have noticed that there is no needs to specify encoding in message subject so this construction must be ommited:
$subject = sprintf('=?%s?B?%s?=', $this->CharSet, base64_encode($subject));
But I can not find out what shall I do to avoid problem with multipart messages and parts encoding.
In case then I use standart mail() function all works fine. But I can not use it because I need string functions to be overloaded.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Have you tried Swift?
Post Reply