I have just created a HTML page call Test.Htm which contains four line graphs.
I am using SAS to automate an email with the html page attached to it and send it to my manager monthly. So that when he opens up the email, it will just show the content of the html (showing all the graphs). This is my script so far...
FILENAME Finnote EMAIL TO = "ABC@Edgecorp.com.au"
SUBJECT = "Monthly Sales Report & Graphs";
PUT '???????????? ';
PUT '????????????? ';
I undestand that this will only automate the email however, it does not attach the webpage on the email.
For what you're doing (HTML page with graphs), you will probably want to use the second method and use ATTACH=
for the HTML page (and remember that if you have created the type of HTML page with <IMG> tags you'll also need to attach the image files).
I do recommend that you search on support.sas.com, as there are some configuration options that you may need to have your SAS administrator set so you can use the EMAIL method.
Personally have been unsuccessful with packaging an EMAIL with attachments, containing a combination of related "files" (HTML, GIF or other image files) that comprise a "webpage". It's definitely possible, but the recipient must first save all of the attachments to a file-directory location, and then launch the primary "index" page. An example would be one where there is a combination of SAS-generated FRAME/CONTENTS HTML documents and also graphic-image files to render as part of the "webpage".
A better approach I found was to generate the web-publishing content to a web-server location, and then send an EMAIL with an imbedded link to the prmary page.
I agree. It is sort of a pain to try to keep all the files together. One solution in SAS 9.2 is to use ODS PACKAGE destination to make a zip archive of all the files you need for a job and then to email the zip archive as the attachment. Of course, you have to be able to send and your recepients need to be able to receive zip files, but that is an alternative.
There's some 9.2 code below to test. You would then use the .ZIP file name with the ATTACH= option for EMAIL and all the files created for ODS HTML -- the main file and all the image files will be together.
ods html close;
ods package publish archive properties(archive_name="allstuff.zip" archive_path="./");
ods package close clear;
ods _all_ close;
** If you have SAS Package Reader installed ;
** you can name the file with the .SPK extension.;
Thanks heaps for your help. It worked Just if anyone need this piece of code... I got something like that :
/********** Email To ***********************/
Filename Test Email To = 'ABC@mail.com' Type='Text/html'
Subject = 'Report';
/***** Your html page starts here which will be view by the receipients *****/
ODS Markup Body = Test Style = SASWEB;
Title 'This is my title on my html';
PUT 'Hello Good Day;
ODS Markup CLOSE;