<!-- METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" --> <%Response.Buffer=TRUE%> <% 'Dimension variables dim msgstring Set cdoConfig = CreateObject("CDO.Configuration") Dim News_ID News_ID = Request.Form("newsID") With cdoConfig.Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mail.smtpserver.com" .Item(cdoSMTPAuthenticate) = 1 .Item(cdoSendUsername) = "[email protected]" .Item(cdoSendPassword) = "Password" .Update End With MHTMLBody = "http://troop101.net/base/newsletter/newsletter.asp?newsID=" & News_ID msgstring = "HTML View has been disabled on your machine, please go to: " & _ "http://troop101.net/base/newsletter/newsletter.asp?newsID=" & News_ID & " To view this newsletter." Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .CreateMHTMLBody MHTMLBody .From = "[email protected]" .To = "[email protected]" .Subject = "Troop 101 Alumni Newsletter" .TextBody = msgstring .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing if err = 0 then Response.write("Messages Sent!") end if %>
This code has worked perfectly for me until just recently when I sent it out to others. They received white text on white background, and could not read the email. The email should have had a blue background on it with the white text.
I thought by declaring MHTMLBody I was getting the page as it appears online, and for me it worked. Thinking some might have web elements blocked I thought I would send a msgstring to them with the site link. This link did not appear on any of the emails, and some received the white text on white background.
I guess my question is, is there anything wrong with the code I am sending, or is there a way to make that better? Or do you think it would be best to just send everyone a link to the newsletter instead of trying to get the problem fixed. Thanks for all the help.
Edited by Immortalarena, 11 June 2008 - 09:16 AM.