ورود

View Full Version : تبدیل شدن متن فارسی به ؟؟؟؟ در ایمیل



M.mojaddady@gmail.com
چهارشنبه 17 تیر 1388, 20:54 عصر
سلام دوستان
مشکل من اینه که موقع ارسال ایمیل کلمات فارسی که کاربر تو تکست باکس ها وارد می کنه رو ؟؟؟؟؟ می فرسته.احتمال زیاد از کدینگ .
راستی اینم گم، من مجبورم از این کد برای ارسال میل استفاده کنم( هاستم گفته)
ممنون می شم کمکم کنید




Namespace ApplicationMessage
Public Class SendMail
Public Function SendMail(ByVal Sender As String, ByVal Destination As String, ByVal Subject As String, ByVal Body As String) As Boolean
Dim iMsg As Object
Dim iConf As Object
Dim Flds
Dim smtpServer
Dim smtpServerPort
iMsg = CreateObject("CDO.Message")
iConf = CreateObject("CDO.Configuration")
Flds = iConf.Fields
With Flds
smtpServer = "127.0.0.1"
If Len(smtpServer) > 0 Then
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
'Your UserID on the SMTP server
'.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = Sender
'Your password on the SMTP server
'.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*****"
'Port (default to 25) or 8025
smtpServerPort = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = smtpServerPort
End If
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 1
.Update()
End With
' Apply the settings to the message.
With iMsg
.Configuration = iConf
.To = Destination
.From = Sender
.Subject = Subject
.HTMLBody = Body
.send()
End With
End Function

End Class

Galestian
شنبه 20 تیر 1388, 07:33 صبح
سلام
در بالای صفحه asp خود از کد زیراستفاده کنید
<%@ language="vbscript" codepage=65001 %>
و زبان صفحه را نیز روی utf8 تنظیم کنید
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

موفق باشید