BookmarkSubscribeRSS Feed
amitosi
Calcite | Level 5

hi ,

im trying to send html file from sas to email, but the contents does'nt works.

when im trying the link of contents directly from sas - it wotks.

but when im trying it from html frile sent to my mail, im getting the meesage

"Cannot find 'FILE.html' , make sure the path or internet address is correct .

help ?

thx Smiley Happy,

amit

6 REPLIES 6
art297
Opal | Level 21

It would help to see your code and know which version of SAS you're using and on which computing system.

amitosi
Calcite | Level 5

hi,

%let note=;

ods html

        body="&path_html.body and con.html"

        frame="&path_html.&note.html"

        contents="&path_html.body and con.&note.html"

        gpath="&path_html.body and con\";

%let path=\\ntsrv1\tohna\IS_Projects\מערכות מידע\DatawareHouse\DW Project\Applications\gstat\Amit\רועי\אשראי מהיר כרטיסים בהרשאה\תוכניות בSAS\ ;

%let path_html=\\ntsrv1\tohna\IS_Projects\מערכות מידע\DatawareHouse\DW Project\Applications\gstat\Amit\רועי\אשראי מהיר כרטיסים בהרשאה\תוכניות בSAS\;

options fmtsearch=(as12 usasfmt);

/*ods tagsets.msoffice2K file="&path.ניתוח כרטיסים בהרשאה.doc"*/

ods tagsets.msoffice2K file="&path.ניתוח כרטיסים בהרשאה.html"

/*ods tagsets.msoffice2K file="&path.ניתוח כרטיסים בהרשאה.xls"*/

style=analysis

options(sheet_interval='proc'  index='yes');

proc tabulate........................

ods _all_ close;

filename outbox clear;

/*ods html contents = "&path_html.body and con.&note.html" ;*/

TITLE; FOOTNOTE;

GOPTIONS RESET = SYMBOL;

ods listing close;

/* system options */;

options

        emailhost=ex2003

        emailport=25

        emailsys=SMTP

        emailauthprotocol=NONE

        noemailfrom;

/* email definition */;

filename outbox email

        to=(

                mymail@gmail.com              

                )

        subject="אשראי מהיר כרטיסים בהרשאה"

        attach="\\ntsrv1\tohna\IS_Projects\מערכות מידע\DatawareHouse\DW Project\Applications\gstat\Amit\רועי\אשראי מהיר כרטיסים בהרשאה\תוכניות בSAS\body and con.html"

        type='text/html'

        encoding='utf-8';

ods html

        file=outbox

        rs=none

        style=Theme

        gpath='\\ntsrv1\Mimun_Ashrai\model development unit\SAS Gpath\KPI Report\'

        options(page_break='no');

ods escapechar="^";

art297
Opal | Level 21

Someone else can probably help you more than I can.  However, just looking at the order of your statements, I noticed that you are using the macro variables &path and &path_html in the ODS declaration BEFORE you declare them in your code.  Have you declared them previously or are you getting an error in your log after it runs that statement?

amitosi
Calcite | Level 5

yes I declared them before , it's working.

the problem is with the mail.

DanielSantos
Barite | Level 11

Hello.

Try to save the mail as an html file, open this with notepad, and check the path of the link.

Cheers from Portugal.

Daniel Santos @ www.cgd.pt

OS2Rules
Obsidian | Level 7

Since you have broken your HTML up into a body, frame, graph, and contents - don't you need to include each of these in the e-mail message for the recipient to get the entire HTML "document".  If you only send the body as the attachment, how can the HTML page display correctly at the other end?

Just thinkin .....

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2126 views
  • 0 likes
  • 4 in conversation