Help using Base SAS procedures

Sending email from sas

Reply
Occasional Contributor
Posts: 5

Sending email from sas

Hi,

I have a SAS program that sends email to a mail address. The sas program is invoked from a mainframe jcl. When the job is submitted, the from address present in the email received is not taken directly from sas program instead the from address  gets displayed as

"<<Mf user ID"@SYSD.XXXX.COM on behalf of 'Expected mail address'

where the Mf user ID is the user id from which we submit the job. We expect the from address in the mail to be present exactly as specified in the SAS program. We dont expect a from address on behalf of the expected mail address.

SAS step in JCL:

//SASSTEP  EXEC SAS,RGN=32M,COND=(0,NE),                        

//          OPTIONS='EMAILHOST=SMTP.XXXX.COM'              

//SYSTCPD  DD DSN=WLP1.TCPPARMS(TCPDATC0),DISP=SHR              

//SASLOG  DD SYSOUT=*                                          

//SASLIST  DD SYSOUT=*                                          

//SYSIN    DD DISP=SHR,DSN=SAS Program file

SAS program control card:

FILENAME OUTBOX EMAIL

TO= ("XXXX1@YYYY1.com")

FROM= ("ZZZZ1@KKK1.com")

SUBJECT="&SUB1."      

TYPE='TEXT/PLAIN'    

---

In this case, we  are getting from address like "M f user ID @ SYSC.XXXX.com" on behalf of XXXX1@YYYY1.com"  instead of XXXX1@YYYY1.com

Can anyone help in resolving this issue?

Thanks,

Janet

SAS Super FREQ
Posts: 8,775

Re: Sending email from sas

Hi:

  This Tech Support note implies that you might need to use the SENDER option and make FROM and SENDER the same:

http://support.sas.com/kb/11/592.html

and then this Tech Support note has some more explanation.

http://support.sas.com/kb/5/000.html Here's the paragraph from the second note:

 

"Since MVS does not have the EMAILID system option, the FILENAME option

"SENDER" or the !EM directive, "!EM_SENDER!" can be used to specify

the desired e-mail address of the sender.  The sender should not be

confused with the FROM e-mail address.  The option and directive are

available for all hosts."

  If you need more help, then you might want to open a track with Tech Support.

cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 212 views
  • 0 likes
  • 2 in conversation