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-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!

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.

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