Problem: When I open the resluting e-mail, I see the raw HTML code. This occurs with Hotmail, Outlook 2010, Yahoo Mail, and Google Mail.
I got the code below from SAS Filename documentation
Is there a solution.
Thanks
filename outbox email
to = 'me@work.com'
type = 'text/html'
subject = 'Temperature Conversions';
ods html body = outbox
rs = none;
data work.temperatures;
do centigrade = -40 to 100 by 10;
fahrenheit = centigrade * 9 / 5 + 32;
output;
end;
run;
title 'Centigrade to Fahrenheit Conversion Table';
proc print data = work.temperatures;
id centigrade;
var fahrenheit;
run;
title;
ods html close;
Hi:
I don't generally send HTML in the body of an email anymore, since so many mail adminstrators only want plain text in the body of the email and want HTML (or other file types) sent as an attachment. So I use the method that you see on page 7-8 of my "Greatest Hits" paper,
http://support.sas.com/resources/papers/proceedings11/300-2011.pdf (my paper shows RTF instead of HTML -- but that is the only difference).
If you need help figuring out what's happening, you might check with your mail administrators to see whether they prohibit sending /receiving HTML tags in the body of a mail. You might also want to open a track with Tech Support on this, so they can walk you through the various diagnostics (what operating system, what mail clients, what mail method (SMTP, POP), startup mail configuration, mail-related system options, etc).
cynthia
Hi:
I don't generally send HTML in the body of an email anymore, since so many mail adminstrators only want plain text in the body of the email and want HTML (or other file types) sent as an attachment. So I use the method that you see on page 7-8 of my "Greatest Hits" paper,
http://support.sas.com/resources/papers/proceedings11/300-2011.pdf (my paper shows RTF instead of HTML -- but that is the only difference).
If you need help figuring out what's happening, you might check with your mail administrators to see whether they prohibit sending /receiving HTML tags in the body of a mail. You might also want to open a track with Tech Support on this, so they can walk you through the various diagnostics (what operating system, what mail clients, what mail method (SMTP, POP), startup mail configuration, mail-related system options, etc).
cynthia
Thank you.
Ironic since the ultimate goal was to send short SAS generated emails which contain hyperlinks to SAS generated Excel (XML) files.These files tend to be very large and our E-Mail administrator definitely does not like them. So it's back to our non-programmaticworkarounds for the time being. I'll try a different track. It only software. Thanks for the reference.
Hi:
Even if you don't send an ANCHOR tag or fully formatted HTML tags in the body of the mail, you can still provide a URL or a file location in a plain text email. See the attached screen shot. It created an email using the code below. At least, with the plain text information, someone can cut and paste the URL into a browser or plug the physical location into an Explorer window.
cynthia
** test URL in email;
filename doemail email to='xxx.yyy@mycompany.com'
from='aaa.bbb@yourcompany.com'
type='text/plain'
subject='Testing url (not hyperlink) in mail';
data _null_;
file doemail;
put 'this is a test with url.';
put 'Find the report file at: ';
put 'http://www.w3.org/MarkUp/Guide/Style.html';
put 'Or, go to a shared drive and retrieve the file:';
put '\\machine-name\directory\subdir\filename.ext';
run;
filename doemail clear;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.