Chapter 40
The SMTP E-Mail Interface
Sending E-Mail through SMTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771
System Options That Control SMTP E-Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
Statements That Control SMTP E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
FILENAME Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
FILE and PUT Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
Sending E-Mail through SMTP
You can send electronic mail programmatically from SAS using the SMTP (Simple Mail
Transfer Protocol) e-mail interface. SMTP is available for all operating environments in
which SAS runs. To send SMTP e-mail with SAS e-mail support, you must have an
intranet or Internet connection that supports SMTP.
Some SMTP servers require just the user identification as the login ID while others
require the full e-mail address. The SAS SMTP e-mail interface authenticates the user
identification in the following order.
1. If the user ID is specified by the USERID= option in the EMAILHOST= system
option, the SAS SMTP e-mail interface attempts to authenticate by using this user
ID.
2. If the user ID is not specified by the USERID= option, the SAS SMTP e-mail
interface attempts to authenticate by using the user ID specified by the FROM=
option of the FILENAME= statement.
3. If the user ID is not specified in the FROM= option in the FILENAME= statement,
the SAS SMTP e-mail interface attempts to authenticate by using the user ID
specified by the EMAILID= system option.
4. If the user ID is not specified by the EMAILID= system option, the SAS SMTP e-
mail interface looks up the user ID from the operating system and attempts to
authenticate that user ID.
For more information about sending e-mail from SAS, see the SAS documentation for
your operating environment.
771

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.