BookmarkSubscribeRSS Feed
Sivan
Calcite | Level 5
Hi,
Is it possible to send an email from SAS with a hyper link to a file?
If so, can you send me the syntax?

Thanks,
Sivan.
4 REPLIES 4
Pramod_R
Calcite | Level 5
Sivan,

You can send a hyperlink fin a sas e-mail as shown below:


FILENAME mail1 EMAIL
TO=("xxxxx@gmail.com" )
From =("yyyyy@gmail.com")
SUBJECT ="test"
type="text/html"
CT= "text/html" ;


DATA _NULL_;
FILE mail1;
PUT 'Hello!!! ';
PUT "Link text ";
run;

However, it should be noted that the recipient of the email should have access to the url which you specify in the href statement.

Let me know if this makes sense!

Thanks,
Pramod

Message was edited by: Pramod.R Message was edited by: Pramod.R
Bill
Quartz | Level 8
An example of what I use very frequently:

filename mail email ' '

to=("fred@somewhere.com")
from="me@nowhere.com"

subject="Inventory Report for &sysdate";


data _null_;

file mail;

put "auto e-mail for Inventory Report";
put " ";
put "Click on the blue underlined path below to view/print file contents";
put " ";
put "\\MOFtp\\Directory\InvenRpt.pdf";
put " ";


run;
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The last reply does not address the EMAIL content formatting and would be dependent you how your EMAIL client interprets the text-format (default) -- suggest reading up on using appropriate FILENAME statement parameters, as was mentioned earlier in this post-reply thread.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

filename html format email hyperlink site:sas.com
Sivan
Calcite | Level 5
Thanks a lot, it was really helpful!

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6055 views
  • 0 likes
  • 4 in conversation