I have multilanguage emails(Hindi,chinese,japanese etc).
I can not read that multilanguage emails using
imap_fetchbody or imap_body or imap_bodystruct

can anyone help me to read emails?

Recommended Answers

All 2 Replies

There are many possibilities, for example using UTF-8:
1 . you must check charset or character encoding on your PHP settings (php.ini default) and code;
2. php output header, like:

header('Content-Type: text/html; charset=UTF-8');

3. display page (client-side) HTML code have set the mime type coresponding to the language in use, like:

<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

4. use php function imap_utf8() to encode the mail content into UTF-8 charset;
5. to campare and converting string values, use multibyte string functions: http://php.net/mbstring, note: php is not offering guarantees on multibyte comparison and conversions, because currently the php Zend engine is not supporting unicode.

There are many possibilities, for example using UTF-8:
1 . you must check charset or character encoding on your PHP settings (php.ini default) and code;
2. php output header, like:

header('Content-Type: text/html; charset=UTF-8');

3. display page (client-side) HTML code have set the mime type coresponding to the language in use, like:

<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

4. use php function imap_utf8() to encode the mail content into UTF-8 charset;
5. to campare and converting string values, use multibyte string functions: http://php.net/mbstring, note: php is not offering guarantees on multibyte comparison and conversions, because currently the php Zend engine is not supporting unicode.

I tried lot but it's not working

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.