Manbo
asked on
CDONTS - Charset="big5"?
Hi, I am new to ASP. With CDONTS to send email in Chinese, the Notes Mail Server can't read. How can CDONTS tell the Mail Server that the incoming mail's charset is "big5"?
objmail.Charset = "big5" somethings like that?
Many Thanks!!!!
objmail.Charset = "big5" somethings like that?
Many Thanks!!!!
ASKER
Brad
Thx for your comment! I found ur statement is for "SMTPsvg.Mailer". But, how about "CDONTS.NewMail"? I tried and it didn't work. Please advice.
Thanks,
Manbo
Thx for your comment! I found ur statement is for "SMTPsvg.Mailer". But, how about "CDONTS.NewMail"? I tried and it didn't work. Please advice.
Thanks,
Manbo
Can I see your code for sending the email? I think I may have an answer.
Brad
Brad
ASKER
Set objMail = Server.CreateObject("CDONT S.NewMail" )
objMail.From = Request.Form("email")
objMail.To = emailto
objMail.Subject = "Contact us"
objMail.Body = mes_body
objMail.Send
Set objMail = Nothing
Thanks,
Manbo
objMail.From = Request.Form("email")
objMail.To = emailto
objMail.Subject = "Contact us"
objMail.Body = mes_body
objMail.Send
Set objMail = Nothing
Thanks,
Manbo
What does the code for 'mes_body' look like? The reason I ask is becasue the only way to make a change in the ouput would be to add a meta tag to your message body.
Brad
Brad
The only other way you may be able to do it is with a third party mailer.
Brad
Brad
ASKER
salutation = Request.Form("salutation")
fname = Request.Form("fname")
lname = Request.Form("lname")
cname = Request.Form("cname")
phone = Request.Form("phone")
add1 = Request.Form("add1")
add2 = Request.Form("add2")
add3 = Request.Form("add3")
emailfrom = Request.Form("email")
country = Request.Form("country")
fax = Request.Form("fax")
comment = Request.Form("comment")
mes_body = "Name: " & salutation & " " & fname & " " & lname & vbCrLf & "Company Name: " & cname & vbCrLf & "Country: " & country & vbCrLf
mes_body = mes_body & "Company address: " & add1 & " " & add2 & " " & add3 & vbCrLf
mes_body = mes_body & "Tel no: " & phone & vbCrLf & "Fax no: " & fax & vbCrLf & "Email address: " & emailfrom & vbCrLf
mes_body = mes_body & "Question/Comment: " & comment
************************** ********** ********** ********** *
Actually, I tried the third party mailer. But it failed. Here is the code.
Set Mailer = Server.CreateObject("SMTPs vg.Mailer" )
Mailer.RemoteHost = "210.184.52.11"
Mailer.CustomCharSet = "big5"
Mailer.FromAddress = Request.Form("email")
Mailer.AddRecipient = emailto
Mailer.Subject = "Contact Us"
Mailer.BodyText = mes_body
if Mailer.SendMail then
response.write ("Your message was sent")
else
response.write ("Your message was not sent. ")
response.write ("The error was: " & Mailer.Response)
end if
Set Mailer = Nothing
Thanks!!!
Manbo
fname = Request.Form("fname")
lname = Request.Form("lname")
cname = Request.Form("cname")
phone = Request.Form("phone")
add1 = Request.Form("add1")
add2 = Request.Form("add2")
add3 = Request.Form("add3")
emailfrom = Request.Form("email")
country = Request.Form("country")
fax = Request.Form("fax")
comment = Request.Form("comment")
mes_body = "Name: " & salutation & " " & fname & " " & lname & vbCrLf & "Company Name: " & cname & vbCrLf & "Country: " & country & vbCrLf
mes_body = mes_body & "Company address: " & add1 & " " & add2 & " " & add3 & vbCrLf
mes_body = mes_body & "Tel no: " & phone & vbCrLf & "Fax no: " & fax & vbCrLf & "Email address: " & emailfrom & vbCrLf
mes_body = mes_body & "Question/Comment: " & comment
**************************
Actually, I tried the third party mailer. But it failed. Here is the code.
Set Mailer = Server.CreateObject("SMTPs
Mailer.RemoteHost = "210.184.52.11"
Mailer.CustomCharSet = "big5"
Mailer.FromAddress = Request.Form("email")
Mailer.AddRecipient = emailto
Mailer.Subject = "Contact Us"
Mailer.BodyText = mes_body
if Mailer.SendMail then
response.write ("Your message was sent")
else
response.write ("Your message was not sent. ")
response.write ("The error was: " & Mailer.Response)
end if
Set Mailer = Nothing
Thanks!!!
Manbo
A couple of questions about what you tried originally:
1) Can you use an IP address for your RemoteHost method or does it need to be a domain name?
2) What version of ASPMail are you using?
3) I didn't see a variable for 'emailto', could that be the problem?
Well, I am not sure if you can do this with what I saw in your code, but if you were to add this:
mes_body = mes_body & "<meta http-equiv="Content-Type" Content="text/html; charset=big5">"
That could help...
Brad
1) Can you use an IP address for your RemoteHost method or does it need to be a domain name?
2) What version of ASPMail are you using?
3) I didn't see a variable for 'emailto', could that be the problem?
Well, I am not sure if you can do this with what I saw in your code, but if you were to add this:
mes_body = mes_body & "<meta http-equiv="Content-Type" Content="text/html; charset=big5">"
That could help...
Brad
I just saw something else in your code. According to the ASPMail documentation at http://www.serverobjects.com/comp/Aspmail4.htm:
[In regards to Mailer.AddRecipient,] "first off, remove the = sign. AddRecipient sounds like and is actually a method, not a property. Also AddRecipient takes two parameters..."
Youare using an '=' sign and you only have one parameter. Fix this and the code might work.
Brad
[In regards to Mailer.AddRecipient,] "first off, remove the = sign. AddRecipient sounds like and is actually a method, not a property. Also AddRecipient takes two parameters..."
Youare using an '=' sign and you only have one parameter. Fix this and the code might work.
Brad
ASKER
I tried both
mes_body = mes_body & "<meta http-equiv="Content-Type" Content="text/html; charset=big5">"
and
removed the '=' sign
but still fails...
In response to your 3 questions:
1. I don't have a domain name and I think using the IP address directly should be ok, right?
2. How can I know the version?
3. there is a variable "emailto" which is set to my email address, but I missed to show it, sorry about making confuse to you.
Thanks,
Manbo.
mes_body = mes_body & "<meta http-equiv="Content-Type" Content="text/html; charset=big5">"
and
removed the '=' sign
but still fails...
In response to your 3 questions:
1. I don't have a domain name and I think using the IP address directly should be ok, right?
2. How can I know the version?
3. there is a variable "emailto" which is set to my email address, but I missed to show it, sorry about making confuse to you.
Thanks,
Manbo.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
objMail.CustomCharSet = "big5"
Good Luck!
Brad