Up here all went well, when now we have a problem that we haven’t seen. When
a user change the information of the page and gives in to save, the
information is saved in the database, the object CDO.Message is executed and
the page is sent to user’s mail. However, that only works well the first
time. The second user change, and when he save the information, it has saved
save in the database and sent it to mail, but the mail arrive with the
information of the first user,it looks like anyone has changed the
information. But to come directly to the
URL, if is the information ambended.
For conclude, the problem is in the sending, than don’t take the information
updated…
I hope than you can me to help.
My code is the next one:
Set obMail = Server.CreateObject("CDO.Message")
With obMail
.To = myMail_To
.Cc = myMail_Cc
.Bcc = myMail_Bcc
.From = myMail_From
.Subject=myMail_Subject
if mid(myMail_Body,1,7) =
"http://" then
.CreateMHTMLBody
myMail_Body
else
.HtmlBody=myMail_Body
end if
.Send
End With
Set obMail = Nothing
Thanks for your help
The problem is likely that the response to the first request made by
CreateMHTMLBody has been cached and is used to satisify the second request.
In this case I would suggest adding some random querystring value to the url
being passed to CreateMHTMLBody.
Note that whilst CreateMHTMLBody works in this case it is not recommended
for use in ASP. The underlying API it uses to make the request is WinINET
which is heavy and does not have the thread-safety needed to multi-threaded
server side usage. You can probably get away with it in light usage but if
usage gets heavy you may start to get problems.
--
Anthony Jones - MVP ASP/ASP.NET
Because we changed our server, it was Windows 2000 and now is 2003, but we
didn't change any code....
Thank you.
I add a random value in the URL. Now every time that the page has a update
and send it by e-mail, it really send the real information.
Thanks again.