|
|
|
ASP ส่งเมล์แล้วมันอ่านภาษาไทยไม่ออก เป็น ??????? (ASP Send Mail Thai Language) |
|
|
|
|
|
|
|
Code (ASP)
<%
<html>
<head >
<title>XXXX</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
}
a {
font-family: Arial, Helvetica, sans-serif;
}
h1,h2,h3,h4,h5,h6 {
font-family: Arial, Helvetica, sans-serif;
}
-->
</style></head>
<body>
<%
Dim myMail,HTML,strMsg
Set myMail = Server.CreateObject("CDO.Message")
'*** If Using Remote Server ***'
'Dim cdoConfig
'Set cdoConfig = myMail.Configuration
'With cdoConfig.Fields
' .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
' .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
' .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' .Update
'End With
strMsg = ""
strMsg = strMsg &"<h1>My Message</h1><br>"
strMsg = strMsg &"<table width='285' border='1'>"
strMsg = strMsg &" <tr>"
strMsg = strMsg &" <td><div align='center'><strong>My Message </strong></div></td>"
strMsg = strMsg &" <td><div align='center'><font color='red'>My Message</font></div></td>"
strMsg = strMsg &" <td><div align='center'><font size='2'>My Message</font></div></td>"
strMsg = strMsg &" </tr>"
strMsg = strMsg &" <tr>"
strMsg = strMsg &" <td><div align='center'>My ข้อความ</div></td>"
strMsg = strMsg &" <td><div align='center'>My ข้อความ</div></td>"
strMsg = strMsg &" <td><div align='center'>My ข้อความ</div></td>"
strMsg = strMsg &" </tr>"
strMsg = strMsg &" <tr>"
strMsg = strMsg &" <td><div align='center'>My ข้อความ</div></td>"
strMsg = strMsg &" <td><div align='center'>My ข้อความ</div></td>"
strMsg = strMsg &" <td><div align='center'>My ข้อความ</div></td>"
strMsg = strMsg &" </tr>"
strMsg = strMsg &"</table>"
myMail.From = "mail.xxxx.com"
myMail.To = "[email protected]"
myMail.Subject = "My Subject"
myMail.HTMLBody = strMsg
myMail.Send
Response.write ("Mail Sending.")
Set myMail = Nothing
%>
</body>
</html>
อยากทราบว่ามันเป็นที่ อะไรครับ
%>
Tag : - - - -
|
|
|
|
|
|
Date :
2009-09-18 16:49:56 |
By :
jonan27 |
View :
6723 |
Reply :
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (ASP)
<%
myMail.Charset = "TIS-620" 'Add
%>
|
|
|
|
|
Date :
2009-09-18 17:23:19 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Charset'
ยังไม่ได้ ครับ รบกวนด้วยครับ
|
|
|
|
|
Date :
2009-09-21 11:06:32 |
By :
jonan27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ภาษาไทยในส่วน html ให้ครอบด้วย server.htmlencode() ครับ
เช่น
" <td><div align='center'>My ข้อความ</div></td> แก้เป็น
" <td><div align='center'>" & server.htmlencode("My ข้อความ") & "</div></td>"
|
|
|
|
|
Date :
2009-11-10 09:56:30 |
By :
kurono |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองนี่นะครับ ได้ผลนะ
Mail.BodyPart.Charset = "windows-874"
Mail.Subject="ภาษาไทย"
Mail.From="xxxi@xxxcom"
Mail.To="[email protected]"
Mail.TextBody="ภาษาไทยครับพี่น้อง"
|
|
|
|
|
Date :
2011-05-04 15:29:08 |
By :
mrsitti |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ของคุณ mrsitti ใช้ได้ผลจริงๆ ด้วยครับ ขอบคุณครับ ^_______^
|
|
|
|
|
Date :
2011-11-11 17:32:59 |
By :
อนิลวา |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@mrsitti ขอบคุณครับเจอแบบนี้พอดีเลย
.BodyPart.Charset = "windows-874"
|
|
|
|
|
Date :
2014-04-04 14:02:07 |
By :
CHICHA |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2014-04-05 21:11:10 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|