gilbo 0 Newbie Poster

I've moved from a CDONTS script that sent a email as a receipt for an order taht was made from an asp page
With CDOSYS the .createMHTMLbody allows me to reference an HTML page only. When trying to send the asp page nothing happens.
I've tried

<% 
    sch = "http://schemas.microsoft.com/cdo/configuration/" 
 
    Set cdoConfig = CreateObject("CDO.Configuration") 
 
    With cdoConfig.Fields 
        .Item(sch & "sendusing") = 2 ' cdoSendUsingPort 
        .Item(sch & "smtpserver") = "smtp.mycompany.com" 
        .update 
    End With 
 
    Set cdoMessage = CreateObject("CDO.Message") 
 
    With cdoMessage 
        Set .Configuration = cdoConfig 
        .From = "me@mycompany.com" 
        .To = "client@yourcompany.com" 
        .Subject = "Sample CDO Message" 
        .TextBody = "This is a test for CDO.message" 
        .CreateMHTMLBody "file://c:/Websites/MyCompany/mail-attach.asp" 
        .Send 
    End With 
 
    Set cdoMessage = Nothing 
    Set cdoConfig = Nothing 
%>

and also
.CreateMHTMLBody "http://www.MyCompany/mail-attach.asp"
If I use and html file it works fine but my page needs to be asp
Please help, I have trawled the forums around the world for two days and keep finding the same answers that don;t solve my problem or even mention that only html files are allowed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.