BookmarkSubscribeRSS Feed
Nasser_DRMCP
Lapis Lazuli | Level 10

Hello,

I try to send an email by doing

filename mymail

email "...@....fr"

subject="test"

to=(..@...fr)

emailid="..."

 

emailsys= SMTP

;

RUN;

DATA _null_;

file mymail ;

put "hello" ....

 

why it does not work when "email" and "to" are the same adresse ?

thanks for your help

Nasser

 

4 REPLIES 4
andreas_lds
Jade | Level 19

@Nasser_DRMCP wrote:

Hello,

I try to send an email by doing

filename mymail

email "...@....fr"

subject="test"

to=(..@...fr)

emailid="..."

 

emailsys= SMTP

;

RUN;

DATA _null_;

file mymail ;

put "hello" ....

 

why it does not work when "email" and "to" are the same adresse ?

thanks for your help

Nasser

 


Don't know, works at my site without any trouble. You may want to post the log only masking confidential information.

Nasser_DRMCP
Lapis Lazuli | Level 10

Hello,

 

thank you for your respons.

It works. the email was moved in a sub folber of the inbox.

sorry

Nass

Nasser_DRMCP
Lapis Lazuli | Level 10

hello ,

there was no problem. the email sent by sas was well received in the inbox. but a rule in the inbox transferred directly in a subfolder

sorry

Nass

Kurt_Bremser
Super User

Although EMAILSYS and EMAILID are not listed in the documentation , I succeeded in sending me mails (from University Edition):

filename mymail
  email
  "&recipient."
  to="&recipient."
  subject="Test"
  emailid="&recipient."
  emailsys=SMTP
;

data _null_;
file mymail;
put "Test";
run;

filename mymail clear;

Log:

 74         
 75         filename mymail
 76           email
 77           "&recipient."
 78           to="&recipient."
 79           subject="Test"
 80           emailid="&recipient."
 81           emailsys=SMTP
 82         ;
 83         
 84         data _null_;
 85         file mymail;
 86         put "Test";
 87         run;
 
 NOTE: The file MYMAIL is:
       E-Mail-Zugriffskomponente
 
 Nachricht gesendet
       An:          "XXXX"
       Cc:          
       Bcc:         
       Betreff:     Test
       Anhänge: 
 NOTE: 1 record was written to the file MYMAIL.
       The minimum record length was 4.
       The maximum record length was 4.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.03 seconds
       cpu time            0.00 seconds
       
 
 88         
 89         filename mymail clear;
 NOTE: Fileref MYMAIL has been deassigned.

Please post your log, using this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 745 views
  • 1 like
  • 3 in conversation