Forum Moderators: open

Message Too Old, No Replies

Question marks instead of pound signs

         

stevelibby

2:12 pm on May 28, 2009 (gmt 0)

10+ Year Member



Hi
i am trying to create a mail list where i can send web content. I have made a prototype application but when its viewed in email pounds signs and most others appear as question marks, how can i get round this and why is it happening?

I am using this as the script
<%
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "awebpage", false
objHTTP.Send
'Response.Write objHTTP.ResponseText

'send mail
Dim strHTML
strHTML = "<html><head><title>" & request.servervariables("server_name") & "</title>"
'strHTML = strHTML & "<meta http-equiv=""Content-Language"" content=""en-gb"">"
strHTML = strHTML & "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1""></head>"
strHTML = strHTML & "<body>"
strHTML = strHTML & objHTTP.ResponseText
strHTML = strHTML & "<a href=""somewebpage"">Remove Me</a>"
strHTML = strHTML & "</body></html>"

'Set up the email object
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
With objMail
.from = "email"
.To = "email"
.Subject = "subject"
.BodyFormat = 0 'CdoBodyFormatHTML
.MailFormat = 0 'CdoMailFormatMime
.Body = strHTML
.Send


End With
Set objMail = Nothing
%>

jdMorgan

2:24 pm on May 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use a "plain" SEO-and-e-mail-friendly URL, and then redirect those requests to the complex URL when they hit your server?

Jim

stevelibby

3:01 pm on May 28, 2009 (gmt 0)

10+ Year Member



Hi Jd, explain a little more please
I tried it using another website with similar symbols and that came through fine, so is it something to do with the web page?

jdMorgan

3:37 pm on May 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're trying to send a URL through e-mail and it's getting corrupted, then you could send a simpler URL and then redirect or rewrite that simpler URL, when received at your server, to the more complex form needed by your application.

If you're trying to send an HTML 'page' in the e-mail body, then you're likely up against character-set and character-encoding problems, and the likely solution is sending the correct MIME-type headers along with the message.

Unfortunately, that's all I know or can guess about the problem here... I don't send HTML-formatted e-mail or complex URLs, myself.

Jim

stevelibby

1:37 pm on May 29, 2009 (gmt 0)

10+ Year Member



hi guys, i have sorted the issue of the pounds signs, if you change certain code like £ to &pound; in original html then that sorts that out.
Now next problem when using the code in first post to send email, when i make changes to the page and resend the email. the updated page is not reflected in the email? why

jdMorgan

2:16 pm on May 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Likely a caching problem. Can't say where without knowing the location of the file you're sending, how it got there, etc.

Jim

daveginorge

9:46 pm on May 29, 2009 (gmt 0)

10+ Year Member



As JD says, looks like you need to clear out your bowser cache before attempting the refresh. I find with FF3 I need to do that about 5 to 6 times a day when developing. Quite easy from the tools menu.