DATA Step, Macro, Functions and more

email html file

Reply
Regular Contributor
Posts: 196

email html file

I would like to email an html file (ie clock_output.html).
When I run this code the html output shows up in my email instead of as an attachment.
Also, the email is not being sent. It is just being created.
How do I fix these two problems.
Thank you.

FILENAME outmail EMAIL
subject="Clock"
from="test@test.com"
;
DATA _null_;
FILE outmail
to="test1@test.com"
ATTACH= "C:\Documents and Settings\clock_output.html";
put "This is the clock";
RUN;
Super Contributor
Super Contributor
Posts: 3,174

Re: email html file

You are missing a FILENAME statement to clear the allocated.

Also, I executed your code, after adding the CLEAR, and the EMAIL had an attachment.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

send email attachment site:sas.com
Ask a Question
Discussion stats
  • 1 reply
  • 100 views
  • 0 likes
  • 2 in conversation