BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have an e mail that gets sent out with a link to the SAS report. Is there a way to say something like, "click here" and have that be the hyper link? My example is below...

filename outbox email;
data _null_;
file outbox
subject=" Report"
from=("Alana")
to=("PAULA")
put ;
put 'Your monthly report is now available on share point. Click (Ideally, I would like the word 'click' to be the hyper link) on the link provided and you will be taken to the Sharepoint site. The file is in the folder.';
put ;
put HERE IS WHERE I NORMALL HAVE THE WHOLE LONG LINK"';
put ;
put 'If you have any questions, please do not hesitate to contact me.';
put /;
run;
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Usually, when you send mail, the mail is sent using whatever settings SAS determines. So, for example, if your mail client is set to send mail in "plain text" then that is what is used for the mail content. If, on the other hand, the mail client is set to send mail as HTML content, then you could use a HTML <A> tag (Anchor tag) in the body of your mail.

For example, in regular HTML coding practice, when you want to create a hyperlink, you specify:
[pre]
<a href="http://www.sas.com">Click to go to SAS</a>
[/pre]

And, in a regular HTML page, the words "Click to go to SAS" would be underlined and in blue (indicating a hyperlink) and the <a> tag would not be visible on the HTML page.

Some mail administrators disable the sending of HTML in the body of the email. So, whether you could use an Anchor tag in the body of your mail would be up to your mail administrators. The email engine does have a TYPE= option that allows you to specify TYPE="text/html" on the FILENAME statement, but I have noticed times when I specify a type of "text/html" and if my mail client is set to Plain text, it seems like the mail client setting is used and is not overridden by SAS.

One thing you can try is to just put your URL in the body of the email as one long link -- I know it doesn't look as nice as a hyperlink, but even in plain text files, sometimes a URL that begins with HTTP:// will be OK and clickable. If you want to explicitly use an <a> tag, then you will have to check and see 1) whether you mail administrators will even allow you to send HTML mail and then if they will 2) you'll have to make sure that you code the anchor tag correctly in the body of your mail.

For some help on using SAS to perform emailing, these user-group papers are helpful:
http://www2.sas.com/proceedings/sugi31/256-31.pdf
http://www2.sas.com/proceedings/sugi29/039-29.pdf
http://www2.sas.com/proceedings/forum2008/038-2008.pdf

Or, you could work with Tech Support, because they could help you figure out the -exact- way for you to send email on your operating system and with your mail client.

cynthia
Bill
Quartz | Level 8
I commonly use the following:

filename claims email ' '
to=("recipient@domain.ca")
subject="Customer Claims Report for %sysfunc(datetime(), datetime13.)";

data _null_;

file claims;
put "Click on the link below to access the file";
put " ";
put
"file:\\mo-sharepoint02\\Technology\Metallurgy\TeamSites\Product\ProductQuality\CoilReports\Claims\ClaimsByProductandMarketGraphs&yearc..pdf";
put " ";
run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 6820 views
  • 0 likes
  • 3 in conversation