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("xxx@xxx.xxx", $subject, $notes, $hdrs))

 

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

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

To: xxxx@xxxx.org

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

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

From: =?UTF-8?Q?=C3=A4=C3=A4hh?=<xxx@xxx.net>

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: xxx@xxx.com

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<xxx@xxx.net>

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.