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
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.