Solved

CDO CreateMHTMLBody times out on .asp, but not .htm/.html/etc

Posted on 2004-09-13
5
620 Views
Last Modified: 2008-01-09
I believe I am using CDO.Message, and specifically CreateMHTMLBody, correctly.  In the snippet below, I get the desired behaviour with the following values of "url":

- "http://www.google.ca"
- "http://localhost/testfile.htm"
- "http://127.0.0.1/testfile.htm"
- "http://my-compujter-name/testfile.htm"

But if I try one of the following (which is, of course, just what I need):

- "http://localhost/testfile.asp"
- "http://127.0.0.1/testfile.asp"
- "http://my-computer-name/testfile.asp"

The operation times out.  No entry is made in my machine's Event Log.  We use a proxy server which is bypassed for local addresses, and I tried adding the appropriate entries for the variables cdoURLProxyServer (the IP of the server) and cdoURLProxyBypass (to "<local>") but that didn't change anything.  I also tried setting the Flags parameter to cdoSuppressAll, no dice.  Any experts out there who can help?

snippet:

...
    Set oMailConfig = New CDO.Configuration
    Set Flds = oMailConfig.Fields
    With Flds
      .item(cdoSendUsingMethod) = cdoSendUsingPort
      .item(cdoSMTPServer) = "myMailServer"
      .item(cdoSMTPConnectionTimeout) = 60
      .item(cdoSMTPServerPort) = 25
      .item(cdoSMTPAuthenticate) = cdoAnonymous
      .Update
    End With
   
    Set oMail = New CDO.Message
    With oMail
      Set .Configuration = oMailConfig
            .To = recipients
            .From = sender
            .subject = subject
            .CreateMHTMLBody url
            .Send
    End With
...

0
Comment
Question by:barryfandango
  • 2
5 Comments
 
LVL 3

Author Comment

by:barryfandango
ID: 12048117
I think I've discovered the source of the problem.  This code is running in a VB6 COM component called by an ASP webpage.  If i change the variable "url" to point to a test ASP page on another web server on the network, it works properly.  If i point "url" to an .aspx (ASP.NET) file running on the _same_ server, it works.  Thus it appears that the ASP process is locked up using the COM component and will not break to render the page I am trying to attach.

Any ideas, experts?  Looks like an old-fashioned deadlock to me but perhaps there's a way around it.
0
 
LVL 3

Author Comment

by:barryfandango
ID: 12559726
I think a refund is in order here, as I never received any response.  I don't want to risk negative feedback, especially in those menacing capitalized letters!
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12848591
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

19 Experts available now in Live!

Get 1:1 Help Now