Solved

CDONTS - Charset="big5"?

Posted on 2003-10-23
12
491 Views
Last Modified: 2010-08-05
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!!!!
0
Comment
Question by:Manbo
  • 8
  • 4
12 Comments
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9616046
It would be this:

objMail.CustomCharSet = "big5"

Good Luck!

Brad
0
 

Author Comment

by:Manbo
ID: 9625193
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
0
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9627443
Can I see your code for sending the email? I think I may have an answer.

Brad
0
 

Author Comment

by:Manbo
ID: 9631694
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = Request.Form("email")
objMail.To = emailto
objMail.Subject = "Contact us"
objMail.Body = mes_body
objMail.Send
Set objMail = Nothing

Thanks,
Manbo
0
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9634255
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
0
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9634507
The only other way you may be able to do it is with a third party mailer.

Brad
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9634520
This is a good easy one to use:

http://prestwood.com/internet/support/aspmail.html

Brad
0
 

Author Comment

by:Manbo
ID: 9648513
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("SMTPsvg.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
0
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9650939
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
0
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 9650998
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
0
 

Author Comment

by:Manbo
ID: 9669408
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.
0
 
LVL 7

Accepted Solution

by:
Brad Dobyns, CSM earned 55 total points
ID: 9672124
So, are you getting an error message or is it still sending the e-mail and you are just not getting it still? Try not adding the meta tag to the email body and see if that works. Otherwise, You might just try to download the latest version of ASPMail and see if that helps also.

Brad
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now