Chapter 38
The SMTP E-Mail Interface
Sending E-Mail through SMTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
System Options That Control SMTP E-Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
Statements That Control SMTP E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
FILENAME Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
FILE and PUT Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
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.
765