I have an asp page that is used to send out distribution lists. It consists of a MessageBox, a file upload box and some check boxes that are used for email only, fax only or HTML email. When you check off HTML email the code takes the HTML file you upload and writes that HTML to the body of the email. It works great for Outlook and some other email clients but not for AOL or web-based email accounts - they receive all of the HTML <TAGS> as the email message and no images. The code looks like this:
If HTMLChk = "on" then
Mailer.ContentType = "text/html"
If oUpl.IsEmpty = False Then
NewFileName = Mid(oUpl.UserFilename, InstrRev(oUpl.UserFilename, "\" + 1)
oUpl.SaveAs NewFileName
FileName2 = oUpl.ServerName
SendMessage = ""
Dim fObj, f
Set fObj = Server.CreateObject("Scripting.FileSystemObject"
if fObj.FileExists (FileName2) then
Set f = fObj.OpenTextFile(FileName2,1,FALSE,FALSE)
Do until f.AtEndOfStream = True
SendMessage = SendMessage & f.ReadLine & vbCrLf
Loop
end if
Set fOBj = nothing
End If
Any suggestions would greatly be appreciated. Marketing likes to send out the pretty emails. Thanks.
If HTMLChk = "on" then
Mailer.ContentType = "text/html"
If oUpl.IsEmpty = False Then
NewFileName = Mid(oUpl.UserFilename, InstrRev(oUpl.UserFilename, "\" + 1)
oUpl.SaveAs NewFileName
FileName2 = oUpl.ServerName
SendMessage = ""
Dim fObj, f
Set fObj = Server.CreateObject("Scripting.FileSystemObject"
if fObj.FileExists (FileName2) then
Set f = fObj.OpenTextFile(FileName2,1,FALSE,FALSE)
Do until f.AtEndOfStream = True
SendMessage = SendMessage & f.ReadLine & vbCrLf
Loop
end if
Set fOBj = nothing
End If
Any suggestions would greatly be appreciated. Marketing likes to send out the pretty emails. Thanks.