Ok, the header is already too long.
But this is the story.
I wrote a script that reads an HTML file using the FileSystemObject and puts the result into a variable "strBody". Then, also using ASP, I email the contents of the variable "strBody" in the body of an MHTML email (one of those emails that come in html format with images and pretty colours, blah, blah, blah). I use this script to send MHTML emails for a client of mine to their clients (no, no, no....i'm not spamming here!!).
Ok so far. Now the HTML file contains href links with the text of the href tag containing the domain name (i.e.
). What i have noticed when looking at the sent email is that the same text within the href tags is modified with the period ("."
before the "com" removed. So in the email, it looks like this "domaincom" and not "domain.com".
So here goes my question/comment/'what the..' statement: Why did the period in "domain.com" get removed????? Has this happened to anyone else? Does anyone know why? Does anyone have a solution?
Now here's what really boggles me. In the HTML code for the file I read using the FileSystemObject, i put bold tags around the links. So that i get
.
And when I use that, the text for the link in the email comes out fine. That is, in the email i get domain.com and not domaincom.
What the......???
Anyone have any idea? Here's some code:
The above code is what i used. It's pretty standard, no weird stuff, no 'way-out-there' kinda stuff. Just standard code.
Your help/commiseration/general thoughts would be greatly appreciated.
thanks.
But this is the story.
I wrote a script that reads an HTML file using the FileSystemObject and puts the result into a variable "strBody". Then, also using ASP, I email the contents of the variable "strBody" in the body of an MHTML email (one of those emails that come in html format with images and pretty colours, blah, blah, blah). I use this script to send MHTML emails for a client of mine to their clients (no, no, no....i'm not spamming here!!).
Ok so far. Now the HTML file contains href links with the text of the href tag containing the domain name (i.e.
Code:
<a href='[URL unfurl="true"]http://wwww.domain.com'>domain.com</a>[/URL]
So here goes my question/comment/'what the..' statement: Why did the period in "domain.com" get removed????? Has this happened to anyone else? Does anyone know why? Does anyone have a solution?
Now here's what really boggles me. In the HTML code for the file I read using the FileSystemObject, i put bold tags around the links. So that i get
Code:
<a href="[URL unfurl="true"]http://www.domain.com"><b>domain.com</b></a>[/URL]
And when I use that, the text for the link in the email comes out fine. That is, in the email i get domain.com and not domaincom.
What the......???
Anyone have any idea? Here's some code:
Code:
dim objFile, objEmail
filepath= "C:/folder/file.html"
set objFile = server.createObject("Scripting.FileSystemObject")
if objFile.FileExists(filepath) then
set objTextStream = objFile.OpenTextFile(filepath)
strBody = objTextStream.ReadAll()
end if
objTextStream.close
set objTextStream = nothing
set objFile = nothing
set objEmail = server.createobject("CDONTS.NewMail")
with objEmail
.To = to_email
.From = "webmaster@domain.com"
.Subject = "Newsletter Test"
.MailFormat = CdoMailFormatMail
.BodyFormat = CdoBodyFormatHTML
.Body = strBody
.Send
end with
set objEmail = nothing
The above code is what i used. It's pretty standard, no weird stuff, no 'way-out-there' kinda stuff. Just standard code.
Your help/commiseration/general thoughts would be greatly appreciated.
thanks.