Ask a Question related to ASP Components, Design and Development.
-
M. Agel #1
ASP - Sending UTF-8 encoded Emails. How to?
Hello,
i desperately need your help. I am trying since several days to send Emails
containing UTF-8 encoded characters (russian characters in my case).
However, all Mailprograms/Webmailers i tried only show 1 or more question
marks (???) instead of the characters.
I have a german/english/russian Website. All pages are UTF-8 encoded and
everything works fine (contents read/write from/into database, everything
entered in forms etc.) except the problem with the form-mailer.
On my server / hoster runs the last Version of ASPMail 4 (ASPMail SMTPsvg).
Does anybode have an Idea? Does it work with ASPMail? Below is a shortened
excerpt of my ASP page doing the mail-stuff.
....
The Code:
- Everything works fine, only the utf-8 encoded characters appear as "???"
in the resulting mail
<%@ CodePage="65001" Language="VBScript"%>
<%
Session.Codepage=65001
Response.Charset="utf-8"
Response.CodePage=65001
%>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<%
kbetreff = Request("betreff")
knotiz = Request.Form("notiz")
if request.form("button")="Senden" Then
ihreemail = "info@irgendwoGibsGarNichtKeineChance.de"
smtp= "mail.irgendwoGibsGarNichtKeineChance.de"
Message = Message & "Eingaben<br/>"
Message = Message & "<hr><table border=""0"" cellpadding=""2"">"
Message = Message & "<tr><td>Betreff</td><td>" & kbetreff & "</td></tr>"
Message = Message & "<tr><td>Notiz</td><td>" &
replace(knotiz,chr(13),"<br>") & "</td></tr>"
Message = Message & "</table>"
'--------- Email mit ASPMail
verschicken -----------------------------------------------
Set Mailer = Server.CreateObject ("SMTPsvg.Mailer")
Mailer.AddExtraHeader "X-MimeOLE: Produced XYZ"
Mailer.CustomCharSet = "utf-8"
Mailer.FromName = "irgendeine@irgendwoGibsGarNichtKeineChance.de "
Mailer.FromAddress = "irgendwer"
Mailer.Subject = Mailer.EncodeHeader(kbetreff)
Mailer.BodyText = "<html><head>" & "<meta http-equiv=""Content-Type""
content=""text/html;charset=utf-8"">" & "<meta
http-equiv=""Content-Language"" content=""ru"">" & "</head><body>" & Message
& "</body></html>"
Mailer.RemoteHost = smtp
Mailer.AddRecipient "XYZ / Info", ihreemail
Mailer.ContentType = "text/html"
If Mailer.SendMail then
gesendet="ja"
else
gesendet = "nein"
end if
Set Mailer = Nothing
end if
%>
<form method="post" action="formular.asp" accept-charset="UTF-8">
[...]
<input type="text" id="betreff" name="betreff" size="50" value=""
maxlength="100"/>
<textarea rows="7" id="notiz" name="notiz" cols="50"></textarea>
<input type="submit" value="Senden" name="button" />
</form>
M. Agel Guest
-
sending multiple emails
I am re-writing code that sends an email out to whoever has subscribed to a particular page on my sites. The problem is there's three ways to do it,... -
CFMAIL sending two emails
Sounds like you are experiencing a different problem than I was... -
CFMAIL sending two emails
I'm going to give these suggestions a try now. The weird thing for me is it is only sending double emails to the cc recipient. Thanks guys. -
CFMAIL sending two emails
My problems went away by disabling the 'use mail spooler' option in the CF administrator. Have you tried this? Oddly, my double email problem is... -
Sending HTML Emails via a Mac (k)
> The You're not attaching the images, are you? You need to upload the images to a server and link to them from the email. You need to send...



Reply With Quote

