Solved

ASP Email cdo.message Caching issue

Posted on 2006-10-30
8
651 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:painlessprod
ID: 17836849
I believe this issue has something to do with the internal caching of iis 6
0
 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scheduled IIS .Net2 AppPools recycle and SQL connection Hangs 33 148
SQL to update characters in table column 6 160
Filktering Alphabetically 8 41
ASP Error Handler 5 19
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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