BookmarkSubscribeRSS Feed
Jan_S
Calcite | Level 5

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

1 REPLY 1
Cynthia_sas
Diamond | Level 26

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1371 views
  • 0 likes
  • 2 in conversation