Sending UTF-8 from ASP application

Root Folder > Web Hosting
Since we have JMAIL installed on all servers, you may simply use this component and send UTF-8 emails. You may use the sample code and replace with your own domain name.
<title>UTF-8 Test Email</title>
<p><meta http-equiv="Content-Type" content="text/html; charset=utf-8">

If Len(Request.Form("txtEmail")) > 0 then<

set msg = Server.CreateOBject( "JMail.Message" )

msg.Logging = true
msg.silent = true
msg.From =
msg.FromName = "Your Company"

msg.AddRecipient Request.Form("txtEmail")

msg.Subject = "Test Mail by JMAIL"

msg.Body = Request.Form("txtBody")
msg.ContentType = "text/plain; charset=UTF-8"
if not msg.Send("" ) then
Response.write "<pre>" & msg.log & "</pre>"
Response.write "Message sent succesfully!"
end if
End If

<form method="post" id=form1 name=form1>
Enter your email address:
<input type="text" name="txtEmail" value="<%=Request.Form("txtEmail")%>">
Body :
<input type="text" name="txtBody" value="<%=Request.Form("txtBody")%>">

<input type="submit" value="Send me an Email with an Attachment!" id=submit1



Add Feedback