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 ] [, trusted_certificates = public-certificate ] [, certificate_company = organization ] [, certificate_unit = organization-unit ] [, certificate_name = common-name ] )
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.
trusted_certificates This optional LONG VARCHAR parameter specifies the path and file name of a file that contains one or more trusted certificates. The default is NULL. When this parameter is NULL, a standard SMTP connection is made.
The trusted certificate can be a server's self-signed certificate, a public enterprise root certificate, or a certificate belonging to a commercial Certificate Authority. You must generate your certificates using RSA.
certificate_company This optional LONG VARCHAR parameter specifies that the client accepts server certificates only when the Organization field of the certificate matches this value. This parameter is ignored when the trusted_certificates value is NULL.
certificate_unit This optional LONG VARCHAR parameter specifies that the client accepts server certificates only when the Organization Unit field of the certificate matches this value. This parameter is ignored when the trusted_certificates value is NULL.
certificate_name This optional LONG VARCHAR parameter specifies that the client accepts server certificates only when the Common Name field on the certificate matches this value. This parameter is ignored when the trusted_certificates value is NULL.
DBA authority
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_startsmtp just before executing xp_sendmail.
If you specify smtp_auth_username and smtp_auth_password, and the server does not support the SMTP authentication capability, error code 104 is returned.
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 dbeng12.exe and dbsrv12.exe. For example, with McAfee VirusScan you can prevent mass mailing by adding these two processes to the list of Excluded Processes in the Properties area.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |