Contents Index System extended stored procedures xp_startmail system procedure

ASA SQL Reference
  System Procedures and Functions
    System extended stored procedures

Extended stored procedures for MAPI and SMTP


Adaptive Server Anywhere includes system procedures for sending electronic mail using the Microsoft Messaging API standard (MAPI) or the Internet standard Simple Mail Transfer Protocol (SMTP). These system procedures are implemented as extended stored procedures: each procedure calls a function in an external DLL.

In order to use the MAPI or SMTP stored procedures, a MAPI or SMTP e-mail system must be accessible from the database server machine.

The stored procedures are:

The following procedure notifies a set of people that a backup has been completed.

CREATE PROCEDURE notify_backup()
BEGIN
   CALL xp_startmail( mail_user='ServerAccount',
                  mail_password='ServerPassword'
                     );
   CALL xp_sendmail( recipient='IS Group',
                     subject='Backup',
                     "message"='Backup completed'
                     );
   CALL xp_stopmail( )
END

The mail system procedures are discussed in the following sections.


xp_startmail system procedure
xp_startsmtp system procedure
xp_sendmail system procedure
xp_stopmail system procedure
xp_stopsmtp system procedure

Contents Index System extended stored procedures xp_startmail system procedure