Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP CDO
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO 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 January 16th, 2005, 12:53 PM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default cdo Message. Read Receipt /delivery confirmation

What do I need to add the code below to request a delivery confirmation and or read receipt!

Thanks



Sub SendMail

    Dim cdoMessage, cdoConfig, strFilename

    Const strMailServer = "outgoing.xxx.net"
    Const strUserName = ""
    Const strPassword = ""
    Const strFrom = """Matisyahu"" <[email protected]>"
    Const strBCC = "[email protected]"

    Set cdoMessage = Server.CreateObject("CDO.Message")
    Set cdoConfig = Server.CreateObject("CDO.Configuration")

    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = strUserName
    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = strPassword
    cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
    cdoConfig.Fields.Update




    Set cdoMessage.Configuration = cdoConfig

    cdoMessage.FROM = strFrom
    cdoMessage.To = strMailTo
    cdoMessage.BCC = strBCC
    cdoMessage.Subject = strSubject

    If intSendMode = cdoSendAttach Then

        strFilename = Request.ServerVariables("PATH_TRANSLATED")
        strFilename = Left(strFilename, InStrRev(strFilename, "\")) & strSubject & ".htm"

        'Create Attachment
        Dim fsoMyFSO, fsoMyTemplate
        Set fsoMyFSO = Server.CreateObject("Scripting.FileSystemObject")
        Set fsoMyTemplate = fsoMyFSO.CreateTextFile(strFilename, True)
        fsoMyTemplate.Write strTemplateBody
        fsoMyTemplate.Close

        Set fsoMyTemplate = Nothing
        Set fsoMyFSO = Nothing

        cdoMessage.AddAttachment strFilename
        cdoMessage.TextBody = ""
    Else
        cdoMessage.HTMLBody = strTemplateBody
    End If

    cdoMessage.Send()

    Set cdoMessage = Nothing
    Response.Write "Message sent successfully!"
    Set cdoConfig = Nothing

End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
webshop email confirmation message Nick23 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 September 14th, 2007 03:43 PM
CDO/CDONTS: Receiving mail delivery confirmation antalas Classic ASP Professional 0 February 21st, 2006 03:43 PM
how to show a confirmation message? noor ASP.NET 1.0 and 1.1 Basics 10 May 16th, 2005 03:12 AM
Need help related CDO.Message shankhan Classic ASP Basics 9 January 2nd, 2005 07:08 PM
Confirmation message on delete of Data grid item [email protected] VS.NET 2002/2003 1 December 22nd, 2004 02:27 AM





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