Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > CDO in header?

Reply
Thread Tools

CDO in header?

 
 
Keith D
Guest
Posts: n/a
 
      06-12-2006
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
 
Reply With Quote
 
 
 
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      06-12-2006
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("(E-Mail Removed)", "(E-Mail Removed)", "This is a subject", "This is
a body")
%>




"Keith D" <Keith http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
>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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is ("http://schemas.microsoft.com/cdo/configuration/sendusing") doing in CDO uofs76@yahoo.com ASP General 0 02-07-2007 01:09 PM
Could not access 'CDO.Message' object Lars-Erik Aabech ASP .Net 3 03-04-2004 12:11 PM
MailMessage problem - Could not access 'CDO.Message' object. Anthony Fine ASP .Net 3 02-12-2004 11:35 PM
Help Needed : Error - Cannot create CDO.Message object Cyndia A. ASP .Net 0 01-14-2004 12:45 PM
CDO for Windows 2000 vs CDO for Exchange 2000 ASP .Net 2 07-11-2003 12:31 PM



Advertisments