Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-26-2006, 12:29 AM   PM User | #1
stonerman
New to the CF scene

 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
stonerman is an unknown quantity at this point
Garbled text sending email with SMTPsvg

I'm trying to get a simple email form page to work on a Japanese version of a website. Everything works great, but Japanese text entered into any of the fields when emailed comes back all garbled.

I thought it would be an encoding type problem but my charset is UTF-8 for everything on the page. A watered down version of the code is below. Any ideas what would be causing the text to change when emailed?

Code:
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.ContentType = "text/html"
Mailer.CustomCharSet = "UTF-8"
Mailer.Subject = Mailer.EncodeHeader(Request.Form("subject"))

'start the message body
strMsgHeader = "<html><head></head><body>"
strMsgInfo = strMsgInfo & "Name:                  " &  Request.Form("name") & "<br>"
strMsgInfo = strMsgInfo & "Email:                 " &  Request.Form("email") & "<br>"
strMsgInfo = strMsgInfo & "User Message: " & Request.Form("message") & "<br>"
strMsgInfo = strMsgInfo & "---------------------" & "<br>"
strMsgFooter =  "</body></html>"

  Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

  if Mailer.SendMail then
	msgSent = true
  else
	msgSent = false
  end if
Thanks for any help.
stonerman is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:57 AM.


Advertisement
Log in to turn off these ads.