Jump to content

mb_send_mail problem


arnb

Recommended Posts

I'm attempting to internationalize my online web contact form, it's the last part of my conversion to UTF-8 encoding. MySql and web pages that don't send email work fine. My test contact form uses UTF-8 encoding.

 

Using mb-send_mail seems to work great with European characters, but when I give it some of what I think is Chinese, it produces what looks like (to me) UTF-8 code but is missing some of the encoding, so it shows up as junk. Hmm-I noticed this page is encoded in iso-8859-1 so the "Chinese" source won't show, but I can show the result and perhaps the European (not sure German/Dutch?) source. BTW when I send this stuff with Gmail it works. Please don't ask me what any of the non-english language means, I'm just using it to test.

 

Any advice on how to fix this is appreciated.

 

Thank You

Arn

 

Code snippet

mb_language("uni"); // set UTF-8 language for mb_send_mail command

if (!@mb_send_mail("[email protected]", $subject, $notes, $hdrs))

 

Result with "also öhm äähh ühh puh ja die Sonderzeichen" good

Date: Tue, 13 Nov 2007 15:09:28 -0700

To: [email protected]

Subject: also =?UTF-8?B?w7ZobSDDpMOkaGggw7xoaCBwdWgg?=

=?UTF-8?B?amEgZGllIFNvbmRlcnplaWNoZW4=?=

From: =?UTF-8?Q?=C3=A4=C3=A4hh?=<[email protected]>

Mime-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: BASE64

 

YWxzbyDDtmhtIMOkw6RoaCDDvGhoIHB1aCBqYSBkaWUgU29uZGVyemVpY2hlbgoKClRoaXMgbWVz

c2FnZSB3YXMgZ2VuZXJhdGVkIHVzaW5nIHRoZSBodHRwOi8vV1dXLkFSTkIuT1JHIE9ubGluZSBD

b250YWN0IEZvcm0gZnJvbSBJUCBhZGRyZXNzIDY3LjgxLjkxLjE3OAoKU2hvdWxkIHlvdSBmZWVs

IHRoaXMgbWVzc2FnZSB3YXMgcmVjZWl2ZWQgaW4gZXJyb3IsIGdvIHRvIGh0dHA6Ly93d3cuYXJu

Yi5vcmcvQ29udGFjdC5waHAgZGVzY3JpYmUgdGhlIHByb2JsZW0gYW5kIHNlbmQgdGhlIHNvdXJj

ZSBvZiB0aGlzIG1lc3NhZ2U=

 

Result with "Chinese" characters (bad)

Date: Tue, 13 Nov 2007 15:09:28 -0700

To: [email protected]

Subject: %u7A7A%u95F4%u8FD8%u6CA1%u7ED1%u5B9A%u8BE5%u57DF%u540D,%u8BF7%u5230"%u7A7A%u95F4%u7BA1%u7406",%u628A%u8BE5%u57DF%u540D%u7ED1%u5B9A%u5230%u7A7A%u95F4%u4E0A%u9762.

From: %u7A7A%u95F4%u8FD8%u6CA1<[email protected]>

Mime-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: BASE64

 

JXU3QTdBJXU5NUY0JXU4RkQ4JXU2Q0ExJXU3RUQxJXU1QjlBJXU4QkU1JXU1N0RGJXU1NDBELCV1

OEJGNyV1NTIzMCIldTdBN0EldTk1RjQldTdCQTEldTc0MDYiLCV1NjI4QSV1OEJFNSV1NTdERiV1

NTQwRCV1N0VEMSV1NUI5QSV1NTIzMCV1N0E3QSV1OTVGNCV1NEUwQSV1OTc2Mi4KCgpUaGlzIG1l

c3NhZ2Ugd2FzIGdlbmVyYXRlZCB1c2luZyB0aGUgaHR0cDovL1dXVy5BUk5CLk9SRyBPbmxpbmUg

Q29udGFjdCBGb3JtIGZyb20gSVAgYWRkcmVzcyA2Ny44MS45MS4xNzgKClNob3VsZCB5b3UgZmVl

bCB0aGlzIG1lc3NhZ2Ugd2FzIHJlY2VpdmVkIGluIGVycm9yLCBnbyB0byBodHRwOi8vd3d3LmFy

bmIub3JnL0NvbnRhY3QucGhwIGRlc2NyaWJlIHRoZSBwcm9ibGVtIGFuZCBzZW5kIHRoZSBzb3Vy

Y2Ugb2YgdGhpcyBtZXNzYWdl

 

Link to comment
https://forums.phpfreaks.com/topic/77236-mb_send_mail-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.