Help using Base SAS procedures

SMTP connection in sas session

Regular Contributor
Regular Contributor
Posts: 166

SMTP connection in sas session

In sas9.2 we have the option to specify the smtp to use to send our email during a session. With the emailhost emailport etc: options.

When i try to use this i get the following error
ERROR: No email identity, specify -EMAILID=userid in config file or on command line.

I have specified the EMAILID="myloginid" in the options statement.

If someone could please guide on this.

Posts: 9,371

Re: SMTP connection in sas session

In earlier versions of SAS, there was an issue with -EMAILID:

Are you using the rest of the system options?? As it says in the doc:
"For the SMTP access method, use this option (EMAILAUTHPROTOCOL=) in conjunction with the EMAILID=, EMAILPW=, EMAILPORT, and EMAILHOST system options. EMAILID= provides the user name, EMAILPW= provides the password, EMAILPORT specifies the port to which the SMTP server is attached, EMAILHOST specifies the SMTP server that supports e-mail access for your site, and EMAILAUTHPROTOCOL= provides the protocol." (it says here that EMAILID can be either a logon ID, an e-mail profile, or an e-mail address -- have you tried each of these??)

I'd suggest that you work with your email administrator to make sure that you are specifying the all the correct values. Also, if your installation is part of a BI Platform install, you may have to refer to the Web Application Administration Guide for configuration info:

Also, the SAS Companion for your operating system should have some configuration information, such as this doc for Windows: where it says that: "SMTP is available only by using the FILENAME statement for e-mail. If you specify SMTP as the e-mail system in the EMAILSYS system option and you are using an e-mail dialog box, the MAPI e-mail system is used. For information about using SMTP, see SAS Language Reference: Concepts as well as FILENAME Statement, EMAIL (SMTP) Access Method, the EMAILHOST system option, and the EMAILPORT system option."

If you look in the doc, there is an additional link to the FILENAME statement doc for SMTP:
which says: "To send e-mail to an SMTP server, you first specify the SMTP e-mail interface with the EMAILSYS system option, use the FILENAME statement to specify the EMAIL device type, and then submit SAS statements in a DATA step or in SCL code.".

If you check everything out and you continue to have problems, you might wish to open a track with Tech Support.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation