BookmarkSubscribeRSS Feed
Ujjawal
Quartz | Level 8

The following works perfectly except it is not attaching excel file. When this code runs, it is sending email notification but no attachment in the email notification. I tried the different file and format (txt) for attachment but still not working.

FILENAME OUTBOX EMAIL;

DATA _NULL_;

FILE OUTBOX

SUBJECT = "Status : Macro"

FROM = "abc@gmail.com"

TYPE = 'TEXT/PLAIN'

TO = ("abc@gmail.com")

ATTACH= ("/user/ujjawal/file1.xlsx");

PUT "Check logfile to see whether there is any error";

RUN;

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  The location of the attachment must be available to the e-mail server. This is something that you need to check with your email administrators.

cynthia

sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10

Interesting - for both SAS Windows and SAS z/OS (IBM mainframe), I use a remote "SMTP mail server" although my ATTACH=(....) file is local to the system where SAS is executing.  Does that jive with your experience, Cynthia?

Scott Barry

SBBWorks, Inc.

Cynthia_sas
SAS Super FREQ

Ah, I don't use a remote SMTP server. I suppose it is possible for it to work differently...About ATTACHE=, the doc says only that "The physical name is the name that is recognized by the operating environment."

cynthia

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
  • 3 replies
  • 1349 views
  • 0 likes
  • 3 in conversation