There are multiple locations that SAS 9.4 uses to load email settings in order to send an email. This SAS KB article provides an overview of those locations in order to update the email settings. Note that you must verify all of the locations when making changes to SMTP settings (such as email server host name, user ID, password, port, and so on).
In general, the SMTP settings contained in Metadata or the server.xml file are loaded first. (Some SAS applications ONLY use these settings.) Those settings might be overridden by settings in SAS®9 Configuration files. All of these settings are overridden when using OPTIONS or a FILENAME EMAIL statement in SAS code.
This article does NOT include information about debugging SMTP. For information about debugging SMTP, see SAS KB0040550.
SAS KB0040550 provides a snippet of code that you can use to send a test email. Successfully sending a test email FIRST is useful to verify that the email settings are correct before making email configuration changes in Metadata, server.xml. or .cfg files.
Verify that the values are correct in the server.xml file. server.xml is located in <SAS-configuration-directory>/LevX/Web/WebAppServer/SASServer1_1/conf/.
If the SMTP email server requires authentication, verify the following:
To change email settings for SAS® Studio or other mid-tier web application components, see SMTP Mail Server.
Here is an example:
<SAS-configuration-directory>\Levn\Web\WebAppServer\SASServer1_1\conf\server.xml
<Resource auth="Container" mail.transport.protocol="smtp" mail.smtp.host="smtp.email.com" mail.smtp.starttls.enable="true" mail.smtp.port="25
mail.smtp.auth="true" mail.smtp.user="*****" password="***** " mail.debug="true" name="sas/mail/Session" type="javax.mail.Session" mail.smtp.auth.ntlm.disable="true" mail.smtp.ssl.protocols="TLSv1.2" />
Verify that the Email.Host and Email.Port parameter values are correct in SAS Management Console.
Statements set in a SAS Program will override settings in config files.
Once you verify all of the above locations, if an email error still occurs in the SAS Log, that individual SAS Program likely contains OPTIONS or FILENAME EMAIL statements.
You must verify all the locations listed above in order to send email through the expected server.