EMAILHOST= System Option

Specifies one or more SMTP servers that support e-mail access.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Communications: Email
PROC OPTIONS GROUP= EMAIL
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.

Syntax

EMAILHOST= server
EMAILHOST=( 'server-1' 'server-2' <…'server-n'> )

Syntax Description

server
specifies one or more Simple Mail Transfer Protocol (SMTP) server domain names for your site.
Range:The maximum number of characters that can be specified for SMTP servers is 1,024
Requirement:When more than one server name is specified, the list must be enclosed in parentheses and each server name must be enclosed in single or double quotation marks..
Note:The system administrator for your site will provide this information.

Details

When more than one SMTP server is specified, SAS attempts to connect to e-mail servers in the order in which they are specified. E-mail is delivered to the first server that SAS connects to. If SAS is not able to connect to any of the specified servers, the attempt to deliver e-mail fails and SAS returns an error.
Operating Environment Information: To enable the SMTP interface that SAS provides, you must also specify the EMAILSYS=SMTP system option. For information about EMAILSYS, see the documentation for your operating environment.

Comparisons

For the SMTP access method, use this option in conjunction with the EMAILID=, EMAILAUTHPROTOCOL=, EMAILPORT, and EMAILPW system options. EMAILID= provides the user name. EMAILPW= provides the password. EMAILPORT specifies the port to which the SMTP server is attached. EMAILHOST specifies SMTP servers that supports e-mail access for your site. EMAILAUTHPROTOCOL= provides the protocol.