BookmarkSubscribeRSS Feed
sunilreddy
Fluorite | Level 6

I am getting email sender as esasspsrv (macro variable as &sysuserid from stored process server) user id instead of getting macro variable as &_metauser or &_metaperson.

how can i get email sender as &_metauser instead of &sysuserid in

<esasspsrv@esessuxpp5.ss.sw.s10.se>

my email logic

============

%macro email_comm;

Data _null_;

    FILENAME myemail EMAIL (&email_id)
    CC=(&cc_email_id1 &cc_email_id2)
       Subject = "Pushed button  to schedule on  ";

     file myemail;
     put "Hi All,";
     put " ";
     put "Pushed  to schedule on  ";

%mend;

%email_comm;


output
=======


To: <osunil.kumar15@snt.com>
From: <esasspsrv@esessuxpp5.ss.sw.s10.se>
Date: 03/12/2012 04:53PM
Cc: <osunil.kumar15@snt.com>,
Subject: Pushed button to schedule on

Hi All,

2 REPLIES 2
jcbell
Obsidian | Level 7

Sunilreddy,

I don't believe the filename statement supports a FROM option.  However, you can use publishing to send emails and it does support a FROM option.  See this documentation:

http://support.sas.com/rnd/itech/doc9/dev_guide/app/pkgintf/pub2eml.html

-John

NN
Quartz | Level 8 NN
Quartz | Level 8

Hi,

Just try adding a from=

   FILENAME myemail EMAIL (&email_id)

from = "&_metaperson. <&_metauser.@mailclient.com> "
There are certain conditions under which this would not work. Depending on your mail protocols.. Hence try it out..

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 980 views
  • 0 likes
  • 3 in conversation