Architecting, installing and maintaining your SAS environment

SMTP CLI SAS 9.4

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

SMTP CLI SAS 9.4

[ Edited ]

Hi everyone:

 

My question is, I configured smtp in the sasv9.cnf file

 

-emailsys SMTP
-emailhost www.xxx.yyy.zzz
-emailport 25
-emailauthprotocol login
-emailid  user@mail.com
-emailpw password

 

when I run the next code from SAS Enterprise Guide this works ok

 

options emailsys=SMTP
 emailhost=www.xxx.yyy.zzz
 emailport=25
 emailauthprotocol=login
 emailid=user@mail.com
 emailpw=password;

Filename mymail Email
    To='user@anothermail.com'
    Subject='Test';

Data _NULL_;
    File mymail;
    put 'This is a test';
Run;

 

but if I run the same code from CLI (Command Line Interface) in linux the mail not send, Any idea?,

 

Thanks in advance.


Accepted Solutions
Solution
‎05-17-2017 09:21 PM
PROC Star
Posts: 424

Re: SMTP CLI SAS 9.4

In a platform installation there are many sasv9.cfg files and which ones are used will depend on how you invoke SAS. Running a SAS program in SAS EG will use the chain of sasv9.cfg files for the SAS Workspace Server. Running a SAS program from the command line using the Foundation SAS command (e.g. /opt/sas/sashome/SASFoundation/9.4/sas) will most likely not be using the same config files (unless you tell it to).

 

One way to debug this is to run proc options in your SAS code to determine which options have been set and how they were set. Look for the CONFIG option. Compare what you get in SAS EG and what you get from the CLI.

View solution in original post


All Replies
Solution
‎05-17-2017 09:21 PM
PROC Star
Posts: 424

Re: SMTP CLI SAS 9.4

In a platform installation there are many sasv9.cfg files and which ones are used will depend on how you invoke SAS. Running a SAS program in SAS EG will use the chain of sasv9.cfg files for the SAS Workspace Server. Running a SAS program from the command line using the Foundation SAS command (e.g. /opt/sas/sashome/SASFoundation/9.4/sas) will most likely not be using the same config files (unless you tell it to).

 

One way to debug this is to run proc options in your SAS code to determine which options have been set and how they were set. Look for the CONFIG option. Compare what you get in SAS EG and what you get from the CLI.

Super User
Posts: 3,250

Re: SMTP CLI SAS 9.4

For starters you should NEVER modify sasv9.cfg, you should change sasv9_usermods.cfg.

 

To ensure all of your SAS environments within SASApp (if that's the name of your logical SAS server) get the required changes then apply it to sasv9_usermods.cfg in:

 

\.......\SAS\Config\Lev1\SASApp

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 231 views
  • 5 likes
  • 3 in conversation