Solved

ASP Email cdo.message Caching issue

Posted on 2006-10-30
8
643 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 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

20 Experts available now in Live!

Get 1:1 Help Now