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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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