The SAS Output Delivery System and reporting techniques

ODS EMAIL only HTML code appears in the body no table

Reply
New Contributor
Posts: 3

ODS EMAIL only HTML code appears in the body no table

Hi guys. I have a problem somewhere that I am unable to pinpoint. I run ODS EMAIL with a simple statement that produces e-mail output on everyone elses machine except mine. They get a table in the e-mail body while I only get HTML code. See bellow.

Sample code Example:

outbox email   to='removedemail@aol.com'        type='text/html'

subject='Temperature conversions';

     temperatures;

do centigrade = -40 to 100 by 10;

9/5+32;

output;

end;

;

html3        body=outbox /* Mail it! */        rs=none; /* <<< THATs it

'Centigrade to Fahrenheit conversion table';

     print;

id  centigrade
var fahrenheit;

;

html close;

Their output in the body of the e-mail:

-40 -40
-30 -22
-20  -4
-10  14
   0  32
  10  50
  20  68
  30  86
  40 104
  50 122
  60 140
  70 158
  80 176
  90 194
100 212

My output in the body of the e-mail:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2
Final//EN">

<HTML>

<!-- Generated by SAS Software -->

<!-- Http://www.sas.com
-->

<HEAD>

<TITLE>SAS Output</TITLE>

<META http-equiv="Content-type"
content="text/html;
charset=windows-1252"> </HEAD> <BODY
onload="startup()" onunload="shutdown()"
vlink="#004488" alink="#004488" link="#0066AA"
leftmargin=8 rightmargin=8 bgcolor="#E0E0E0"> <SCRIPT
LANGUAGE="JavaScript">

<!--

// This script is to load all object onLoad() functions
function startup(){ } function shutdown(){ } //--> </SCRIPT>

<font
face="Arial, Helvetica, sans-serif" size="3"
color="#002288"> <SCRIPT LANGUAGE="JavaScript">

<!--

var _info = navigator.userAgent

var _ie = (_info.indexOf("MSIE") > 0

    &&
_info.indexOf("Win") > 0

    &&
_info.indexOf("Windows 3.1") < 0) var _ie64 =
_info.indexOf("x64") > 0 //--> </SCRIPT>

<A NAME="IDX"> </A>

<CENTER>

<font
face="Arial, Helvetica, sans-serif" size="3"
color="#002288"> <TABLE
cellspacing=1 cellpadding=1 rules=NONE frame=VOID border=0 width=100%
bgcolor="#E0E0E0"> <TR>
<TD ALIGN=CENTER bgcolor="#E0E0E0"><font  face="Arial, Helvetica, sans-serif"
size="5" color="#002288"><b><i>Centigrade to
Fahrenheit conversion table</i></b></font></TD>
</TR> </TABLE> </font></CENTER> <P>
<CENTER> <font
face="Arial, Helvetica, sans-serif" size="3"
color="#002288"> <TABLE
cellspacing=1 cellpadding=7 rules=GROUPS frame=BOX border=1
bgcolor="#F0F0F0" bordercolor="#000000"> <thead>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>centigrade</b></font></TD>

<TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>fahrenheit</b></font></TD>

</TR>

</thead>

<tbody>

<TR>

<TD ALIGN=RIGHT
bgcolor="#B0B0B0" nowrap><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
-40</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3" nowrap><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> -40</font></TD>
</TR> <TR>  <TD
ALIGN=RIGHT bgcolor="#B0B0B0" nowrap><font  face="Arial, Helvetica, sans-serif"
size="4" color="#0033AA"><b>
-30</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3" nowrap><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> -22</font></TD>
</TR> <TR>  <TD
ALIGN=RIGHT bgcolor="#B0B0B0" nowrap><font  face="Arial, Helvetica, sans-serif"
size="4" color="#0033AA"><b>
-20</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3" nowrap><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000">  -4</font></TD> </TR>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0" nowrap><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
-10</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000">  14</font></TD> </TR>
<TR>

<TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b> 
0</b></font></TD>

<TD ALIGN=RIGHT
bgcolor="#D3D3D3"><font
face="Arial, Helvetica, sans-serif" size="3"
color="#000000">
32</font></TD> </TR> <TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
10</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000">  50</font></TD> </TR>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
20</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000">  68</font></TD> </TR>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
30</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000">  86</font></TD> </TR>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
40</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> 104</font></TD>
</TR> <TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
50</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> 122</font></TD>
</TR> <TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font  face="Arial, Helvetica, sans-serif"
size="4" color="#0033AA"><b>  60</b></font></TD>  <TD ALIGN=RIGHT
bgcolor="#D3D3D3"><font
face="Arial, Helvetica, sans-serif" size="3"
color="#000000"> 140</font></TD> </TR>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
70</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> 158</font></TD>
</TR> <TR>  <TD
ALIGN=RIGHT bgcolor="#B0B0B0"><font  face="Arial, Helvetica, sans-serif"
size="4" color="#0033AA"><b>  80</b></font></TD>  <TD ALIGN=RIGHT
bgcolor="#D3D3D3"><font
face="Arial, Helvetica, sans-serif" size="3"
color="#000000"> 176</font></TD> </TR>
<TR>  <TD ALIGN=RIGHT
bgcolor="#B0B0B0"><font
face="Arial, Helvetica, sans-serif" size="4"
color="#0033AA"><b>
90</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> 194</font></TD>
</TR> <TR>  <TD
ALIGN=RIGHT bgcolor="#B0B0B0"><font  face="Arial, Helvetica, sans-serif"
size="4" color="#0033AA"><b>
100</b></font></TD>
<TD ALIGN=RIGHT bgcolor="#D3D3D3"><font  face="Arial, Helvetica, sans-serif"
size="3" color="#000000"> 212</font></TD>
</TR> </tbody> </TABLE> </font></CENTER> </font><SCRIPT
LANGUAGE="JavaScript">

<!--

// This script is to load all object onLoad() functions
function startup(){

}

function shutdown(){

}

//-->

</SCRIPT>

</BODY>

</HTML>

SAS Employee
Posts: 88

Re: ODS EMAIL only HTML code appears in the body no table

You will need to have the -EMAILSYS option set to SMTP and the -EMAILHOST set to the value of your email server set before this would work correctly. These options have to be set on the config file or at startup.

New Contributor
Posts: 3

Re: ODS EMAIL only HTML code appears in the body no table


How would I go about doing it on startup?  This is the EG 6.1 version and I cant get to the configuration file.  Thank you for the quick reply.

Super Contributor
Posts: 333

Re: ODS EMAIL only HTML code appears in the body no table

I would guess your email settings are already setup if you are able to send email at all through SAS.

EJ

New Contributor
Posts: 3

Re: ODS EMAIL only HTML code appears in the body no table

Yes the everything runs including sending the e-mail automaticaly, the problem is that the e-mail body contains that HTML code instead of actual table.  I tried with others runing the exact same code it comes out just fine.  I spent days trying to find a solution. 

SAS Employee
Posts: 88

Re: ODS EMAIL only HTML code appears in the body no table

If everyone else can run this without a problem, what you will want to do is verify the values of these two options using the below PROC OPTIONS statement first.

proc options group=email;

run;

Super Contributor
Posts: 333

Re: ODS EMAIL only HTML code appears in the body no table

Just to be clear your email is set to view HTML email by default. If the same code generates emails to others that work, the real problem may be your email client.

EJ

New Contributor
Posts: 4

Re: ODS EMAIL only HTML code appears in the body no table

At the risk of stating the obvious, the table is there in your email. But it's in HTML format.

So I agree with esjackso1 it's likely to be that your email client is not interpreting the HTML.

Ask a Question
Discussion stats
  • 7 replies
  • 1186 views
  • 8 likes
  • 4 in conversation