Solved

ASP Email cdo.message Caching issue

Posted on 2006-10-30
8
645 Views
Last Modified: 2012-05-05
I am embedding an object that is a web page to my email "www.somepage.com.foo.asp" that is all good and working quite well
the problem comes in when Exchange is is caching the page "www.somepage.com.foo.asp" when i change foo.asp the old page still gets sent. how do i refresh the object
<%

    cdoURL = "http://schemas.microsoft.com/cdo/configuration/"

    FromAddress = "address"
    ToAddress = "myaddress"
    ToName = "Brandon"
    Subject = "Subject"
    MHTMLBody = "www.somepage.com.foo.asp"

    Set cdoM = CreateObject("CDO.Message")
    Set cdoC = CreateObject("CDO.Configuration")
    Set cdoF = cdoC.Fields

    With cdoM
        Set .Configuration = cdoC

        .CreateMHTMLBody MHTMLBody
        .From = FromAddress
        .To = ToAddress
        .Subject = Subject
        .TextBody = textbody

    End With
    cdoM.send

    Set cdoM = Nothing
    Set cdoS = Nothing
    Set cdoF = Nothing
%>

0
Comment
Question by:painlessprod
  • 6
8 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 17836680
I don't know that you can without deleting the message and resending it. I suspect that the message is not holding the url value, but rather, the content of the page when the message is sent.

FtB
0
 

Author Comment

by:painlessprod
ID: 17836715
how would i go about deleting the cdo object?
0
 

Author Comment

by:painlessprod
ID: 17836761
this is a resend sorry, i should be clear.
I deliver the message via the page
then i change the site and resend the messsage and the original page still comes up, not the page that reflects the change it seems as if the page is cached on the server side
0
 

Author Comment

by:painlessprod
ID: 17836849
I believe this issue has something to do with the internal caching of iis 6
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:painlessprod
ID: 17836874
ahh that was it
was in internal cache in iis 6, i simply changed the http headers to expire immediately and it was all good
0
 

Author Comment

by:painlessprod
ID: 17836889
silly stuff
i had also put in my code
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Cache-Control", "must-revalidate"
Response.AddHeader "Cache-Control", "no-cache"
but that didnt seem to do it, was overriden by is i guess
0
 
LVL 1

Accepted Solution

by:
webmasterbiz earned 500 total points
ID: 17848679
painlessprod

You don't need to add any of that response stuff.

If you add a time stamp to the querystring, Exchange would think you are requesting a new page.

Change this :

   MHTMLBody = "www.somepage.com.foo.asp"

To this :

   MHTMLBody = "www.somepage.com.foo.asp?ts=" & now()
0
 

Author Comment

by:painlessprod
ID: 17850654
ahhh interesting, already solved it for this solution but that makes alot of sense, thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now