Solved

ASP Email cdo.message Caching issue

Posted on 2006-10-30
8
654 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP CDO - Limiting Connections 3 73
If condition on Html with Asp 11 49
2012 SQL to JSON Select 5 45
Building JSON Results Table FROM DB 9 50
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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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 …

738 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