Help using Base SAS procedures

sending email with a hyper link from SAS

Reply
Occasional Contributor
Posts: 12

sending email with a hyper link from SAS

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.
Occasional Contributor
Posts: 19

Re: sending email with a hyper link from SAS

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
Super Contributor
Posts: 291

Re: sending email with a hyper link from SAS

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;
Super Contributor
Super Contributor
Posts: 3,174

Re: sending email with a hyper link from SAS

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
Occasional Contributor
Posts: 12

Re: sending email with a hyper link from SAS

Thanks a lot, it was really helpful!
Ask a Question
Discussion stats
  • 4 replies
  • 2331 views
  • 0 likes
  • 4 in conversation