CDO in header?

Discussion in 'ASP General' started by Keith D, Jun 12, 2006.

  1. Keith D

    Keith D Guest

    I have multiple asp files which used CDONTS. As we are switching over to
    CDOSYS these files need to be updated. Is there a way that the cdo commands
    can be called from one general area, rather then have to modify each file?

    Thanks
     
    Keith D, Jun 12, 2006
    #1
    1. Advertisements

  2. Sure! Have an #include file that handles the mail with a function.

    -- mail.asp

    <%
    Function SendMail(From, To, Subject, Body)
    Set cdo = CreateObject("CDO.Message")
    ...
    Set cdo = Nothing
    End Function
    %>

    -- any other page

    <!--#include file=mail.asp-->
    <%
    Call SendMail("", "", "This is a subject", "This is
    a body")
    %>




    "Keith D" <Keith > wrote in message
    news:D...
    >I have multiple asp files which used CDONTS. As we are switching over to
    > CDOSYS these files need to be updated. Is there a way that the cdo
    > commands
    > can be called from one general area, rather then have to modify each file?
    >
    > Thanks
     
    Aaron Bertrand [SQL Server MVP], Jun 12, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    1,239
    dave wanta
    Jul 11, 2003
  2. Newsgroup - Ann
    Replies:
    4
    Views:
    933
    lilburne
    Nov 2, 2003
  3. John Smith

    Header files included in header files

    John Smith, Jul 21, 2004, in forum: C Programming
    Replies:
    18
    Views:
    860
    Jack Klein
    Jul 24, 2004
  4. Replies:
    3
    Views:
    1,534
    Walter Roberson
    May 1, 2006
  5. Bit byte
    Replies:
    1
    Views:
    857
    benben
    Apr 19, 2006
  6. mlt
    Replies:
    2
    Views:
    1,153
    Jean-Marc Bourguet
    Jan 31, 2009
  7. majlandt
    Replies:
    3
    Views:
    370
    Anthony Jones
    Oct 17, 2006
  8. Replies:
    0
    Views:
    539
Loading...