Jump to content

send UTF-8 mail


anatak

Recommended Posts

I try to send mail messages encoded in UTF-8

it used to work more or less. I received the message on my cellphone and when I manually select the encoding as UTF-8 the message was displayed correctly.

 

I made some changes but basically use the same code and now it does not work anymore.

 

when I use my old code it still works. I am wondering why the new code can not send the message in a readable format to my cellphone.

 

here is what I tested

send a mail using the old code with Japanese characters.

in a yahoo mail box after selecting view page -> encoding -> utf-8 the mail is displayed correctly

in a mozilla thunderbird mailbox the mail is automatically set to utf-8 encoding

on my cellphone I have to manually select utf-8 encoding and then the mail is displayed correctly

 

send a mail using the new code with Japanese characters

in a yahoo mail box after selecting view page -> encoding -> utf-8 the mail is displayed correctly

in a mozilla thunderbird mailbox the mail is automatically set to utf-8 encoding

on my cellphone after selecting utf-8 encoding the japanese characters are just left out.

 

there are no changes in the form from wich to send mail

 

the only changes are in the mailfunction I use

old function

function mailuser($arg1, $arg2, $arg3, $arg4)
{
$to = $arg1;
$subject = $arg2;
$body = $arg3;
$header = $arg4;

ini_set("SMTP", "mail.kyushuinfo.com"); //use for online version
ini_set("smtp_port", "25");
mail($to, $subject, $body, $header);
}

new function

function mailuser($to, $subject, $body, $header)
{
ini_set("SMTP", "mail.kyushuinfo.com"); //use for online version
ini_set("smtp_port", "25");
mail($to, $subject, $body, $header);
}

 

I don't see how that can affect the way the mail is send

Does anyone have any suggestions or ideas what may be the problem ?

 

kind regards

anatak

Link to comment
Share on other sites

1. you download xpertmailer from this link: http://www.xpertmailer.com/

2. you install it

3. you include it

4. you set charset

 

$m = new MAIL;

$m->Html = array(
'content'  => '<b>text/html <i>message</i></b>', // required
'charset'  => 'utf-8', // optional
'encoding' => 'base64' // optional
);

 

5. you mail it ;-)

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.