• Administration
  • Spanish Classes
  • Society.
  • Culture.
  • English
    • Arabic
    • Bulgarian
    • Croatian
    • Czech
    • Danish
    • Dutch
    • English
    • Estonian
    • Finnish
    • French
    • Georgian
    • German
    • Greek
    • Hebrew
    • Hindi
    • Hungarian
    • Indonesian
    • Italian
    • Japanese
    • Korean
    • Latvian
    • Lithuanian
    • Norwegian
    • Persian
    • Polish
    • Portuguese
    • Romanian
    • Russian
    • Serbian
    • Slovak
    • Slovenian
    • Swedish
    • Thai
    • Turkish
    • Ukrainian
  • Twitter
  • Facebook
  • Instagram
  • Example of a Function to Send Emails With CDO In ASP
    • Science.
    • Get To Know Us
    • Psychology. Top Definitions
    • History. Top Definitions

    Example of a Function to Send Emails With CDO In ASP

    Asp   /   by admin   /   July 04, 2021

    I made this function to constantly send emails from the forms of my pages in ASP, so I only have to create a file and include it to send emails in ASP.

    SendMail function (fname sender, femail sender, fmessage, femailpara, fasunto, fadjoint)
    ON ERROR RESUME NEXT

     'Send a text mail using authentication on an SMTP server

     Const cdoSendUsingPickup = 1 'Send message using SMTP local directory pickup service
    Const cdoSendUsingPort = 2 'Send using network, SMTP over network

     Const cdoAnonymous = 0 'Do not authenticate
     Const cdoBasic = 1 'Authenticate basic (plain text)
     Const cdoNTLM = 2 'NTLM

     Set objMessage = CreateObject ("CDO.Message")
     objMessage. Subject = issue
     objMessage. From = f sendername & ""
     objMessage. To = femailpara
     objMessage. Bcc = fbcc
     objMessage. TextBody = fmessage
     IF fadjoint <> "" THEN
     objMessage. AddAttachment fadjoint
     END IF

     '== The SMTP server is configured here.

     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/sendusing") = 2

     'Name or IP of Remote SMTP Server
     objMessage. Configuration. Fields. Item _
     ("

    instagram story viewer
    https://schemas.microsoft.com/cdo/configuration/smtpserver") =" localhost "

     'Type of authentication, NONE, Basic (Base64 encoded), NTLM
     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/authenticate") = cdoBasic

     'Your UserID on the SMTP server
     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/sendusername") =" USER "

     'Your password on the SMTP server
     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/sendpassword") =" PASSWORD "

     'Server port (typically 25)
     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

     'Use SSL for the connection (False or True)
     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

     'TIMEOUT in seconds, the maximum time that CDO will try to establish a connection with the SMTP
     objMessage. Configuration. Fields. Item _
     ("
    https://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

     objMessage. Configuration. Fields. Update

     '== Finish SMTP configuration ==

     objMessage. Send

     SendEmail = femailpara & ","

    End Function
    %>

    Tags cloud
    • Asp
    Rating
    0
    Views
    0
    Comments
    Recommend to friends
    • Twitter
    • Facebook
    • Instagram
    SUBSCRIBE
    Subscribe to comments
    YOU MIGHT ALSO LIKE
    • Literature
      04/07/2021
      Book Summary The Marketing War
    • Writings
      04/07/2021
      Example of How to Make an Information Sheet
    • English
      04/07/2021
      Example of Present Continuous in English
    Social
    2087 Fans
    Like
    1701 Followers
    Follow
    7674 Subscribers
    Subscribers
    Categories
    Administration
    Spanish Classes
    Society.
    Culture.
    Science.
    Get To Know Us
    Psychology. Top Definitions
    History. Top Definitions
    Examples
    Kitchen
    Basic Knowledge
    Accounting
    Contracts
    Css
    Culture And Society
    Curriculum Vitae
    Right
    Design
    Art
    Job
    Polls
    Essays
    Writings
    Philosophy
    Finance
    Physics
    Geography
    Story
    Mexico History
    Asp
    Popular posts
    Book Summary The Marketing War
    Literature
    04/07/2021
    Example of How to Make an Information Sheet
    Writings
    04/07/2021
    Example of Present Continuous in English
    English
    04/07/2021

    Tags

    • Basic Knowledge
    • Accounting
    • Contracts
    • Css
    • Culture And Society
    • Curriculum Vitae
    • Right
    • Design
    • Art
    • Job
    • Polls
    • Essays
    • Writings
    • Philosophy
    • Finance
    • Physics
    • Geography
    • Story
    • Mexico History
    • Asp
    • Administration
    • Spanish Classes
    • Society.
    • Culture.
    • Science.
    • Get To Know Us
    • Psychology. Top Definitions
    • History. Top Definitions
    • Examples
    • Kitchen
    Privacy

    © Copyright 2025 by Educational resource. All Rights Reserved.