Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2004, 04:49 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes Madhu,

  I solved it with CDO. Here is the code

    dim receiptto
    receiptto="receiptmailid"
    set cdoconfig=CreateObject("CDO.configuration")
    set cdomsg=CreateObject("CDO.Message")

    with cdoconfig.Fields
' .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
' .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtpservername"
' .Update
    end with
    with cdomsg
' set .Configuration=cdoconfig
        .Fields("urn:schemas:mailheader:disposition-notification-to")=receiptto
        .Fields("urn:schemas:mailheader:return-receipt-to") =receiptto
        .From="frommailid"
        .To="tomailid"
        .Subject="Sample mail"
        .HTMLBody="<b>Hello</b>"
        .DSNOptions=4
        .Fields.update
        .Send
    end with
    set cdoconfig=nothing
    set cdomsg=nothing


Actually, the commented lines are also needed. But i didnt succeed if they were. I tried with commenting those, then i got.



-----------
Rajani

 
Old November 24th, 2004, 05:06 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Thanks a lot for this code. This also solves my long sought problem of adding mail headers using CDO.





Similar Threads
Thread Thread Starter Forum Replies Last Post
not receiving any mail from new topics.. gbianchi Forum and Wrox.com Feedback 2 April 16th, 2007 07:34 AM
CDO/CDONTS: Receiving mail delivery confirmation antalas Classic ASP Professional 0 February 21st, 2006 03:43 PM
Receiving mail with Outlook 2000 VBA spotts-71 All Other Wrox Books 3 August 24th, 2004 10:41 AM
Receiving mail with Outlook 2000 VBA spotts-71 Pro VB 6 7 July 17th, 2003 03:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.