bharat_bhusanam Posted June 5, 2007 Share Posted June 5, 2007 I want to send the mail in Russian language. The mail content has two part, 1st part comes from database, and other part is entered by user in russian language. I am using UTF-8 in database. I am also used Utf-8 (<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ) in all web page. My site and is working perfectly. But I am unable to send mail in diffarent language. The mail is send well, but I am getting the mail with unicode chrecter of the language instade of original language. Plz. help me!!!!!!!!!1 My code is given below---------------- $message =" <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> </head> <body> <table width='600' border='0' align='left' cellpadding='0' cellspacing='0'> <tr valign='top'> <td align='left'><!--header Section Start here--> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td height='35'align='left' bgcolor='#3b5998' style='font-size:14px; color:#FFFFFF; font-family:Arial'> <strong>$mailTitle1</strong>- $mailTitle2</td> </tr> </table> <!--header Section end here here--> </td> </tr> <tr> <td height='20' colspan='2' align='left' bgcolor='#6d84b4' style='font-size:14px; color:#FFFFFF; font-family:Arial; font-style:italic'> $mailTitle3 -- $group_name</td> </tr> <tr> <td><table width='600' align='center' cellspacing='0' cellpadding='0' style='BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; border-bottom: 1px solid; border-top-color:#6d84b4; border-right-color:#6d84b4; border-left-color:#6d84b4; border-bottom-color:#6d84b4' > <tr> <td><!--Page body Section Start here--> <table width='600' border='0' align='center' cellpadding='0' cellspacing='0'> <tr> <td valign='top'> <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'> <tr> <td colspan='3'></td> </tr> <tr> <td> </td> <td colspan='2' align='left' style='font-size:12px; font-family:Arial'> </td> </tr> <tr> <td> </td> <td colspan='2' align='left' style='font-size:12px; font-family:Arial'>$mail_contents</td> </tr> <tr> <td rowspan='4'> </td> <td height='8' align='left' style='font-size:12px; font-family:Arial'>$mailTitle4 </td> <td width='37%' rowspan='4' align='left'></td></tr> <tr> <td height='10' ></td> </tr> <tr> <td height='8' align='left' style='font-size:12px; font-family:Arial'><strong>$mailTitle5 </strong></td> </tr> <tr> <td align='left' valign='top' style='font-size:12px; font-family:Arial'><a href='$site_address' target='_blank' >$site_address</a></td> </tr> <tr> <td colspan='3'> </td> </tr> </table> </td> </tr> </table> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td height='3'></td> </tr> <tr> <td></td> </tr> </table> <!--Page body Section end here--> </td> </tr> </table> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td><!--Footer Section Start here--> <table width='100%' align='left'border='0' cellpadding='0' cellspacing='0' style='BORDER-RIGHT: 1px solid; BORDER-LEFT: 1px solid; border-left: 1px solid; border-right-color:#6d84b4; border-left-color:#6d84b4; border-left-color:#6d84b4'> <tr > <td height='25' align='center' valign='middle' bgcolor='#ffffff' style='font-size:12px; font-family:Arial'> <a href='$site_address/about_us.php' target='_blank'>$mailLink1</a><a href='$site_address/about_us.php'></a> | <a href='$site_address/faq.php' target='_blank'>$mailLink2</a><a href='$site_address/faq.php'></a> | <a href='$site_address/Imprint.php'>$mailLink6</a> | <a href='$site_address/terms.php'>$mailLink3</a> | <a href='$site_address/privacy.php' target='_blank'>$mailLink4</a><a href='$site_address/privacy.php'></a> | <a href='$site_address/contact.php' target='_blank'>$mailLink5</a><a href='$site_address/contact_detail.php'></a></td> </tr> <!----------------add a line --------------- start ------------------> <tr><td height='1 px' bgcolor='#6d84b4' colspan='2' ></td></tr> <!----------------add a line --------------- end ------------------> </table> <!--Footer Section End here--> </td> </tr> </table></td> </tr> </table> </body> </html> "; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; $headers .= 'From: Bharat<bharat_bhusanam@rediffmail.com>' . "\r\n"; mail($mailto, $subject, $message, $headers); ------------------------------------------------------------------------------- I am getting mail content like this type of charecter instade of russian language КоÑтромÑкой гоÑударÑтвенный универÑитет им. Ð.Ð.ÐекраÑова hi kumar Quote Link to comment https://forums.phpfreaks.com/topic/54331-email-problem-i-am-unable-to-send-email-in-diffarent-language/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.