Starts an email session under SMTP.
xp_startsmtp( smtp_sender = email-address , smtp_server = smtp-server [, smtp_port = port-number ] [, timeout = timeout ] [, smtp_sender_name = username ] [, smtp_auth_username = auth-username [, smtp_auth_password = auth-password )
smtp_sender This LONG VARCHAR parameter specifies the email address of the sender.
smtp_server This LONG VARCHAR parameter specifies which SMTP server to use, and is the server name or IP address.
smtp_port This optional INTEGER parameter specifies the port number to connect to on the SMTP server. The default is 25.
timeout This optional INTEGER parameter specifies how long to wait, in seconds, for a response from the database server before aborting the current call to xp_sendmail. The default is 60 seconds.
smtp_sender_name This optional LONG VARCHAR parameter specifies an alias for the sender's email address. For example, 'JSmith' instead of 'email-address'.
smtp_auth_username This optional LONG VARCHAR parameter specifies the user name to provide to SMTP servers requiring authentication.
smtp_auth_password This optional LONG VARCHAR parameter specifies the user name to provide to SMTP servers requiring authentication.
DBA authority required
xp_startsmtp is a system procedure that starts a mail session for a specified email address by connecting to an SMTP server. This connection can time out. Therefore, it is recommended that you call xp_start_smtp just before executing xp_sendmail.
Virus scanners can affect xp_startsmtp, causing it to return error code 100. For McAfee VirusScan version 8.0.0 and later, settings for preventing mass mailing of email worms also prevent xp_sendmail from executing properly. If your virus scanning software allows you to specify processes that can bypass the mass mailing protections, specify dbeng11.exe and dbsrv11.exe. For example, in the case of McAfee VirusScan, you can add these two processes to the list of Excluded Processes in the Properties area for preventing mass mailing.
See Return codes for MAPI and SMTP system procedures.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |