MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SAS EMAIL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Mon Feb 14, 2011 10:07 am    Post subject: SAS EMAIL Reply with quote

Hi,
I am using the following code to send email from mainframe via SAS.
Code:

FILENAME MYMAIL EMAIL 'ABC@XYZ.COM'
      SUBJECT="HI";
DATA _NULL_;
     FILE MYMAIL;
     PUT "!EM_CC!( 'ABC@XYZ.COM')" ;
     PUT "!EM_FROM!(ABC@XYZ.COM)";
     RUN;


The Email is generated fine with the above code but when I am receiving the mail it is displaying some thing like
pppp; on behalf of ABC@XYZ.COM

Is there any way to remove the on behalf of thing.
i.e. the FROM header in the mail contains only ABC@XYZ.COM

Any help would be appreciated.
Regards,
Lenovo
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Feb 14, 2011 11:26 am    Post subject: Reply with quote

lenovo,

Look up the !EM_FROM! 'address' directive in your sas manual or here

http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Mon Feb 14, 2011 12:45 pm    Post subject: Reply with quote

Hi Kolusu,
Thanks for the quick response.
There are two options in manual for the FROM part
1) PUT "!EM_FROM! "john@hisplace.org" [this is the one i was using it earlier]

and

2)
user="john@hisplace.org";
put '!EM_FROM!' user;

But with both the options the FROM part contain ON BEHALF OF.
Any idea fow this can be removed.

Rgds,
Lenovo
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Feb 14, 2011 6:20 pm    Post subject: Reply with quote

lenovo,

If your SAS session logged directly onto an email server using the email name
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Tue Feb 15, 2011 5:28 am    Post subject: Reply with quote

Kolusu,
How can I check, if a SAS session is logged directly to the email server or with a email server with different email user name? bonk

And one more thing, I am currently using the following JCL to execute the SAS email

//ddname EXEC SAS
//SYSIN DD DISP=SHR,DSN=aaaaa
//*

Where aaaaa is the name of the dataset that contains the code that I have posted in the initial post.
I also checked the prod proc and system proc (upto my knowledge) but I couldn't find out the location of the proc.

Lenovo
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Feb 15, 2011 12:58 pm    Post subject: Reply with quote

lenovo wrote:
Kolusu,
How can I check, if a SAS session is logged directly to the email server or with a email server with different email user name? bonk


Are using your email address and password to send the mail or you using a different email address than yours?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rkarthik22
Beginner


Joined: 27 Sep 2008
Posts: 24
Topics: 9

PostPosted: Wed Feb 16, 2011 4:56 am    Post subject: Reply with quote

Hi Lenovo,

Can you Please try this and let me know its working fine.

Code:

FILENAME OUTBOX EMAIL FROM=("email@yahoo.com") 
                   TO=("karthik@gmail.com"         
                       "mukesh@yahoo.com")   
SUBJECT ="world cup 2011";         
DATA _NULL_;                                                     
   FILE OUTBOX;                                                 
Back to top
View user's profile Send private message
rkarthik22
Beginner


Joined: 27 Sep 2008
Posts: 24
Topics: 9

PostPosted: Wed Feb 16, 2011 5:19 am    Post subject: Reply with quote

What a coincidence.....

Lenovo, Kolusu and my joining date is 27!!!!
Back to top
View user's profile Send private message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Wed Feb 16, 2011 9:44 am    Post subject: Reply with quote

Hi,

@Kolusu: I am not specifying any password with the mail id. And I tried both ways i.e. by specifying my own email id and with different email id. For both it still contains the "on behalf of" before the email id I specify in the FROM header.

@rkarthik22: No its not working for me. It still contains "on behalf of" before the email id I specify in the FROM header.

Rgds,
Lenovo
Back to top
View user's profile Send private message
bluewawa
Beginner


Joined: 09 Jun 2011
Posts: 1
Topics: 0

PostPosted: Thu Jun 09, 2011 10:03 am    Post subject: Reply with quote

Hi Lenovo,

Have you got your anwser? I had this issue as well and looking for the solution.

Thanks.
Back to top
View user's profile Send private message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Tue Jul 12, 2011 8:17 am    Post subject: Reply with quote

Hi bluewawa,

No, I havn't got the solution on this one.

Thanks!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group