Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ทำไมทำระบบส่งเมล แล้วมันส่งได้ แต่ไม่เป็นภาษาไทยอ่ะครับ



 

ทำไมทำระบบส่งเมล แล้วมันส่งได้ แต่ไม่เป็นภาษาไทยอ่ะครับ

 



Topic : 052986



โพสกระทู้ ( 135 )
บทความ ( 0 )



สถานะออฟไลน์
Blogger



ทำไมทำระบบส่งเมล แล้วมันส่งได้ แต่ไม่เป็นภาษไทยอ่ะครับ กลับส่งไปเป็นภาษาจีนแทนอ่ะครับ
ตามรูป
เมลเข้าจากการทำระบบส่งเมล

โค้ดฟอร์มส่งเมลครับ
Code (PHP)
<?
session_start();
include "inc/config.inc.php";
?>
<!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=windows-874" />
<meta name="robots"  content="index,follow">
<title>ลืมรสัสผ่าน : กรุณากรอก Email เพื่อรับรหัสผ่าน</title>
<style type="text/css">
<!--
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
	color: #FF6600;
}
a:active {
	text-decoration: none;
	color: #000000;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #CCCCCC;
}
.style1 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-size: small; }
-->
</style>
</head>

<body onload="MM_preloadImages('img/title_m1-1.gif','img/title_m2-1.gif','img/title_m3-1.gif','img/title_m4-1.gif','img/title_m5-1.gif')">
<table width="1020" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" background="img/bg_left.jpg">&nbsp;</td>
    <td width="1000"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2"><? include "header.php"; ?></td>
      </tr>
      <tr>
        <td width="210" align="center" valign="top" bgcolor="#000000"><? include "menu.php"; ?></td>
        <td width="790" align="center" valign="top" bgcolor="#000000"><table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td></td>
            </tr>
          </table>
            <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><img src="img/title_main.gif" width="780" height="45" /></td>
              </tr>
              <tr>
                <td><table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td></td>
                    </tr>
                  </table>
                    <table width="770" height="32" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="150" height="32"><a href="show_all_prd.php?cate_id=1" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','img/title_m1-1.gif',1)"><img src="img/title_m1.gif" name="Image9" width="150" height="32" border="0" id="Image9" /></a></td>
                        <td width="5" height="32">&nbsp;</td>
                        <td width="150" height="32"><a href="show_all_prd.php?cate_id=2" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','img/title_m2-1.gif',1)"><img src="img/title_m2.gif" name="Image6" width="150" height="32" border="0" id="Image6" /></a><a href="#02" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','img/title_m1-1.gif',1)"></a></td>
                        <td width="5" height="32">&nbsp;</td>
                        <td width="150" height="32"></a><a href="show_all_prd.php?cate_id=3" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','img/title_m3-1.gif',1)"><img src="img/title_m3.gif" name="Image7" width="150" height="32" border="0" id="Image7" /></a><a href="#03" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','img/title_m1-1.gif',1)"></a></td>
                        <td width="5">&nbsp;</td>
                        <td width="150"><a href="show_all_prd.php?cate_id=4" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','img/title_m4-1.gif',1)"><img src="img/title_m4.gif" name="Image10" width="150" height="32" border="0" id="Image10" /></a></td>
                        <td width="5">&nbsp;</td>
                        <td width="150"><a href="show_all_prd.php?cate_id=5" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image101','','img/title_m5-1.gif',1)"><img src="img/title_m5.gif" name="Image101" width="150" height="32" border="0" id="Image101" /></a></td>
                      </tr>
                    </table>
                    <table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td></td>
                      </tr>
                  </table></td>
              </tr>
            </table>
            <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><form action="p_losspass.php" method="post" enctype="multipart/form-data" name ="checkForm" id="checkForm" onsubmit="return check1()">
                  <font color="#FFFFFF" size="4"><strong>กรุณากรอก E-mail</strong></font>
                  <input name="email" type="text" id="email" size="50" />
                  <input type="submit" name="Submit" value="Send" />
<script language="JavaScript" type="text/javascript">

function check1() {
if(document.checkForm.email.value=="") {
alert("กรุณากรอกอีเมล์ของคุณด้วยนะครับ") ;
document.checkForm.email.focus() ;
return false ;
}
else if(checkForm.email.value.indexOf('@')==-1) {
alert("อีเมล์ของคุณไม่ถูกต้องครับ ตัวอย่างเช่น [email protected]") ;
document.checkForm.email.focus() ;
return false ;
}
else if(checkForm.email.value.indexOf('.')==-1) {
alert("อีเมล์ของคุณไม่ถูกต้องครับ ตัวอย่างเช่น [email protected]") ;
document.checkForm.email.focus() ;
return false ;
}
else 
return true ;
}

</script>
                </form>                </td>
              </tr>
          </table></td>
      </tr>
      <tr>
        <td colspan="2" align="center" bgcolor="#000000"><? include "footer.php"; ?></td>
      </tr>
    </table></td>
    <td width="10" background="img/bg_right.jpg">&nbsp;</td>
  </tr>
</table>
</body>
</html>


โค้ดหน้าระบบส่งเมล
Code (PHP)
<?
session_start();
include "inc/config.inc.php";
$email=$_POST[email];
//echo $email;
$s="SELECT email, user, pass FROM `member` where email='$email'";
$re=mysql_query($s) or die("ERROR $s");
$r=mysql_fetch_row($re);
$num=mysql_num_rows($re);
if($num==1){
?>
<!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=windows-874" />
<meta name="robots"  content="index,follow">
<title>ระบบส่งรหัสผ่านให้สมาชิกทาง Email</title>
<style type="text/css">
<!--
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
	color: #FF6600;
}
a:active {
	text-decoration: none;
	color: #000000;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #CCCCCC;
}
.style1 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-size: small; }
-->
</style>
</head>

<body onload="MM_preloadImages('img/title_m1-1.gif','img/title_m2-1.gif','img/title_m3-1.gif','img/title_m4-1.gif','img/title_m5-1.gif')">
<table width="1020" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" background="img/bg_left.jpg">&nbsp;</td>
    <td width="1000"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2"><? include "header.php"; ?></td>
      </tr>
      <tr>
        <td width="210" align="center" valign="top" bgcolor="#000000"><? include "menu.php"; ?></td>
        <td width="790" align="center" valign="top" bgcolor="#000000"><table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td></td>
            </tr>
          </table>
            <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><img src="img/title_main.gif" width="780" height="45" /></td>
              </tr>
              <tr>
                <td><table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td></td>
                    </tr>
                  </table>
                    <table width="770" height="32" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="150" height="32"><a href="show_all_prd.php?cate_id=1" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','img/title_m1-1.gif',1)"><img src="img/title_m1.gif" name="Image9" width="150" height="32" border="0" id="Image9" /></a></td>
                        <td width="5" height="32">&nbsp;</td>
                        <td width="150" height="32"><a href="show_all_prd.php?cate_id=2" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','img/title_m2-1.gif',1)"><img src="img/title_m2.gif" name="Image6" width="150" height="32" border="0" id="Image6" /></a><a href="#02" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','img/title_m1-1.gif',1)"></a></td>
                        <td width="5" height="32">&nbsp;</td>
                        <td width="150" height="32"></a><a href="show_all_prd.php?cate_id=3" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','img/title_m3-1.gif',1)"><img src="img/title_m3.gif" name="Image7" width="150" height="32" border="0" id="Image7" /></a><a href="#03" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','img/title_m1-1.gif',1)"></a></td>
                        <td width="5">&nbsp;</td>
                        <td width="150"><a href="show_all_prd.php?cate_id=4" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','img/title_m4-1.gif',1)"><img src="img/title_m4.gif" name="Image10" width="150" height="32" border="0" id="Image10" /></a></td>
                        <td width="5">&nbsp;</td>
                        <td width="150"><a href="show_all_prd.php?cate_id=5" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image101','','img/title_m5-1.gif',1)"><img src="img/title_m5.gif" name="Image101" width="150" height="32" border="0" id="Image101" /></a></td>
                      </tr>
                    </table>
                    <table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td></td>
                      </tr>
                  </table></td>
              </tr>
            </table>
            <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>
<?
    $strTo = "$r[0]";
    $strSubject = "Test Send Email";
    $strHeader = "From: [email protected]";
   $strMessage = "ชื่อผู้ใช้ของคุณ คือ $r[1]<br>รหัสผ่าน คือ $r[2]";
    $flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader);  // @ = No Show Error //
   if($flgSend)
    {
        echo "<center><font color='#ffffff' size='4'><strong>กรุณารอสักครู่ ระบบกำลังทำการส่ง Email ให้ท่านอยู่...</strong></font></center>";
		echo "<meta http-equiv=refresh content=3;URL=index.php>";
    }
    else
    {
        echo "<center><font color='#ff0000' size='4'><strong>ไม่สามารถทำการส่ง Email ให้ท่านได้...</strong></font></center>";
		echo "<meta http-equiv=refresh content=3;URL=index.php>";
   }
?>
				</td>
              </tr>
          </table></td>
      </tr>
      <tr>
        <td colspan="2" align="center" bgcolor="#000000"><? include "footer.php"; ?></td>
      </tr>
    </table></td>
    <td width="10" background="img/bg_right.jpg">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<? }else{ 
        echo "<center><font color='#ff0000' size='4'><strong>Email ของท่านไม่ถูกต้อง</strong></font></center>";
		echo "<meta http-equiv=refresh content=3;URL=index.php>";
		exit();
		}
?>




Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2010-12-11 17:56:44 By : เดกอ่อนหัด View : 1175 Reply : 10
 

 

No. 1



โพสกระทู้ ( 1,127 )
บทความ ( 2 )



สถานะออฟไลน์


//ส่งไป hotmail
Code (PHP)
$strTo = "$r[0]";
$strSubject = "Test Send Email";
$header = "Content-type: text/html; charset=windows-874\n";
$strHeader .= "From: [email protected]";
$strMessage = "ชื่อผู้ใช้ของคุณ คือ $r[1]<br>รหัสผ่าน คือ $r[2]";







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-11 18:52:07 By : iieszz
 


 

No. 2



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

หรือไม่ลองส่งเป็นแบบ UTF-8 ครับ

Go to : PHP Sending Email HTML Format
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-11 19:27:25 By : webmaster
 

 

No. 3



โพสกระทู้ ( 135 )
บทความ ( 0 )



สถานะออฟไลน์
Blogger

แล้วเราสามารถแทรก TAG HTML หรือปล่าว ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-11 19:52:53 By : เดกอ่อนหัด
 


 

No. 4



โพสกระทู้ ( 135 )
บทความ ( 0 )



สถานะออฟไลน์
Blogger

เป็นเหมือนเดิมครับ
แต่โค้ดเป็น
Code (PHP)
<?
    $strTo = "$r[0]";
    $strSubject = "ชื่อผู้ใช้และรหัสผ่าน สำหรับเข้าสู่ระบบ พระกรรมฐานดอทคอม";
	$strHeader="Content-type: text/html; charset=UTF-8\n ";
    $strHeader.= "From: [email protected]";
    $strMessage = "ชื่อผู้ใช้ของคุณ คือ $r[1]<br>รหัสผ่าน คือ $r[2]";
    $flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader);  // @ = No Show Error //
   if($flgSend)
    {
        echo "<center><font color='#ffffff' size='4'><strong>กรุณารอสักครู่ ระบบกำลังทำการส่ง Email ให้ท่านอยู่...</strong></font></center>";
		echo "<meta http-equiv=refresh content=3;URL=index.php>";
    }
    else
    {
        echo "<center><font color='#ff0000' size='4'><strong>ไม่สามารถทำการส่ง Email ให้ท่านได้...</strong></font></center>";
		echo "<meta http-equiv=refresh content=3;URL=index.php>";
   }
?>


แต่แสดงกล่องเข้าเป็นภาษาไทย ดังภาพ
เมลเข้าจากการทำระบบส่งเมล

แต่พอเข้าไปอ่านเมล เป็นดังภาพ
เมลเข้าจากการทำระบบส่งเมล

ช่วยหน่อยนะครับ ผมเพิ่งเคยทำ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-11 20:06:30 By : เดกอ่อนหัด
 


 

No. 5



โพสกระทู้ ( 135 )
บทความ ( 0 )



สถานะออฟไลน์
Blogger

ช่วยหน่อยนะครับ ผมส่งเมลยังไม่เป็นภาษาไทยเลย
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-12 15:16:20 By : เดกอ่อนหัด
 


 

No. 6



โพสกระทู้ ( 135 )
บทความ ( 0 )



สถานะออฟไลน์
Blogger

มีใครพอจะช่วยผมได้มั้ยครับ ส่งเมลยังไม่เป็นภาษาไทยเลยอ่ะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-16 09:49:00 By : เดกอ่อนหัด
 


 

No. 7

Guest


http://web-programming-bookmark.blogspot.com/2010/12/php-send-mail-utf-8.html
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-16 13:17:58 By : num
 


 

No. 8

Guest


<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
แก้เป็น
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
และเปลี่ยน encoding ไฟล์เป็น utf-8 ด้วยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-16 13:19:32 By : num
 


 

No. 9



โพสกระทู้ ( 135 )
บทความ ( 0 )



สถานะออฟไลน์
Blogger

Quote:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
และเปลี่ยน encoding ไฟล์เป็น utf-8 ด้วยครับ


เปลี่ยนยังงัย อ่ะครับ ช่วยบอกด้วยนะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-18 15:43:22 By : เดกอ่อนหัด
 


 

No. 10



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook



Code (PHP)
	$strSubject = "=?UTF-8?B?".base64_encode("ทดสอบส่งอีเมล์ ชื่อ Subject ภาษาไทย")."?=";
	$strHeader = "'MIME-Version: 1.0' . \r\nContent-type: text/html; charset=utf-8\r\n"; // or UTF-8 //
	$strHeader .= "From: Mr.Weerachai Nukitram<[email protected]>\r\nReply-To: [email protected]";
	$strVar = "ทดสอบครับ";


Go to : php ส่ง mail ฟอร์มส่งเมล์ ตรงหัวเรือง Subject มันไม่เป็นภาษาไทยครับต้องทำไง

Go to : PHP Sending Email HTML Format

Go to : PHP กับการส่งอีเมล์ (Email) ภาษาไทย (Thai) ด้วย UTF-8
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-11 22:51:59 By : webmaster
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ทำไมทำระบบส่งเมล แล้วมันส่งได้ แต่ไม่เป็นภาษาไทยอ่ะครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่