PHP
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Tutorialized ForumsWeb Design & DevelopmentPHP

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old May 1st, 2007, 02:02 AM
bharat_bhusanam bharat_bhusanam is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 bharat_bhusanam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 57 sec
Reputation Power: 0
Question how to send multilanguage email in php

I want to send a html mail with multi-language in php.
Some part of mail content is from database. And some part user have to enter.
My database is ok. And Unicode utf-8 is used.
When I am retrieving data from database to my web page is ok. And coming in Russian language,
But when I am using same content to send email, the content comes with Unicode character but not in Russia language
I want mail in Russian language.

output of mail content is ----------------------------------


Академия Федерального агентства ПравительстРенной связи и информаÑ*ии при президенте Российской ФедераÑ*ии

Имя пользователя # из # имя вуза # пригласил тебя в

---------------------------------------------------


my mail code is as follows-------------
$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'> $mail1_invitationsent $mail2_invitationsent</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'> $mail3_invitationsent ($college_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 width='2%'> </td>
<td colspan='2' align='left' style='font-size:12px; font-family:Arial'>$mail_contents</td>
</tr>
<tr>
<td rowspan='5'> </td>
<td height='10' align='left' style='font-size:12px; font-family:Arial'></td>
<td width='37%' rowspan='5' align='left'> </td>
</tr>
<tr>
<td width='61%' height='8' align='left' style='font-size:12px; font-family:Arial'>$mail4_invitationsent </td>
</tr>
<tr>
<td height='10'></td>
</tr>
<tr>
<td height='8' align='left' style='font-size:12px; font-family:Arial'>$mail5_invitationsent </td>
</tr>
<tr>
<td align='left' valign='top' style='font-size:12px; font-family:Arial'></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>
</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: xxxxx' . "\r\n";
mail($to, $subject, $message, $headers);

----------------------------- end of code-----------------------
some variables are used to change language
and
$mail_contents is the vatiable of mail contents which is partly from database and partyt from use input.
Plz. solve my prob
__________________
Kumar Bharat Bhusanam

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentPHP > how to send multilanguage email in php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT