Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2013, 11:52 AM
g3t g3t is offline
Registered User
 
Join Date: Nov 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default cdo mail utf-8 issue

Hi

I know that there alot of threads out there on this issue but I couldnt seem to get any of them to work.

Im very new to using asp so not sure how to figure this one out.

I just need the returned email to interpret foreign characters.

thanks for any help on this.

Code:

if request.form("Postback")="1" then
	dim title, titleError,Marke,MarkeError,Modell,ModellError,Company,CompanyError,Telephone,TelephoneError,Mobile,MobileError,Province,ProvinceError,IProductError,IHow,IHowError
	dim FormError
	FormError=0
	
	title=safetext(request.Form("title"))
	Marke=safetext(request.Form("Marke"))
	Modell=safetext(request.Form("Modell"))
	Company=safetext(request.Form("Company"))
	Zip=safetext(request.Form("Zip"))
	Ort=safetext(request.Form("Ort"))
	Province=safetext(request.Form("Province"))
	Telephone=safetext(request.Form("Telephone"))
	Mobile=safetext(request.Form("Mobile"))
	Email=safetext(request.Form("Email"))
	IProduct=safetext(request.Form("IProduct"))
	IHow=safetext(request.Form("IHow"))
	
	
	if FormError=0 then
		Dim MyBody
		
		MyBody="<html>"
		
		MyBody=MyBody & "Datum: " & date() & " " & time & "<br>"
		MyBody=MyBody & "Anrede: " & title & "<br>"
		MyBody=MyBody & "Vorname: " & Marke & "<br>"
		MyBody=MyBody & "Nachname: " & Modell & "<br>"
		MyBody=MyBody & "Firma: " & Company & "<br>"	
		MyBody=MyBody & "Postleitzahl: " & Zip & "<br>"	
		MyBody=MyBody & "Ort: " & Ort & "<br>"	
		MyBody=MyBody & "Provincia: " & Province & "<br>"	
		MyBody=MyBody & "Telefon: " & Telephone & "<br>"
		MyBody=MyBody & "Móvil : " & Mobile & "<br>"	
		MyBody=MyBody & "Email: " & Email & "<br>"	
		MyBody=MyBody & "Producto: " & IProduct & "<br><br>"		
	
		MyBody = MyBody & "IP:"  & Request.ServerVariables("REMOTE_ADDR") 

		'SUBMI FORM
		Set MyMail = Server.CreateObject("JMail.SMTPMail")
		MyMail.Charset = "utf-8" 

		MyMail.ServerAddress = "10.44.41.150"
		MyMail.Sender = "[email protected]"
		MyMail.AddRecipient "[email protected]"
	
		
		'... MyMail.AddRecipient MyEmail '... person who sent the form
		MyMail.Subject = "ES Contact Form"
		MyMail.HTMLBody = MyBody
			MyMail.Execute
		Set myMail=nothing
		
		
		Response.Redirect("?Sent=Yes&Product=" & server.URLEncode(IProduct))
	end if
	
end if





Similar Threads
Thread Thread Starter Forum Replies Last Post
CDO.Message utf-8 Problem hellsa Classic ASP Professional 2 June 28th, 2009 11:02 PM
Sending Mail with CDO BrianWren Pro VB 6 2 April 16th, 2009 02:51 AM
ASP CDO MAIL cullancrothers Classic ASP Professional 2 February 24th, 2006 06:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.