 |
|
SQL Server Tips by Burleson |
Choice of Mail Library
With these issues in mind, this chapter describes a new XP called
XP_SMTPSENDMAIL which sends mail using Internet standards based
email i.e. SMTP. There are a number of SMTP libraries available such
as the author’s CPJNSMTPConnection class available from
www.naughter.com as well as the ATL Server class CSMTPConnection. In
addition there are commercial SMTP libraries available. Since the
release of Windows 2000, there is a standard programming library
called ‘CDO for Windows 2000’ built into Windows, which provides
SMTP based mail. In addition to interfacing to SMTP mail servers, it
also provides integration with the local SMTP service and its
disk-based queue. This is ideally suited for integration with SQL
Server as it allows the delivery of the emails to occur outside the
context of SQL Server and thus not block your XP as would happen
otherwise. CDO for Windows 2000 is designed to be incorporated into
applications and as such does not have the quirks and foibles which
Simple MAPI and Extended MAPI have, such as Security dialogs
appearing when an email is being sent by third party programs.
Basing an XP on CDO for Windows 2000 also means that the full
richness of Internet emails can be made available through the XP.
For example it would be relatively easy to extend the XP described
in this chapter to set the priority of the email using the
‘X-Priority’ Mail header.
The above book excerpt is from:
Super SQL
Server Systems
Turbocharge Database Performance with C++ External Procedures
ISBN:
0-9761573-2-2
Joseph Gama, P. J. Naughter
http://www.rampant-books.com/book_2005_2_sql_server_external_procedures.htm |