proc template;
define style styles.MyMail;
parent= styles.journal;
style body /
fontfamily="Arial, Helvetica, Sans-serif"
fontsize= 2
fontweight=medium
fontwidth=normal
color=blg
backgroundcolor=white
marginleft=8pt
marginright=8pt;
style header /
fontfamily="Arial, Helvetica, Sans-serif"
fontsize= 4
fontweight=bold
fontstyle=roman
bordercolor=black
textalign=center
backgroundcolor=CX00365B
color=white;
style Data /
fontfamily="Arial, Helvetica, Sans-serif"
fontweight=medium
fontsize=2
fontstyle=roman
color=black
backgroundcolor=white;
style SystemTitle /
fontfamily="Arial, Helvetica, Sans-serif"
fontweight=bold
fontsize=6
fontstyle=roman
textalign=left
color=white
backgroundcolor=CX00365B;
style SystemTitle2 /
fontfamily="Arial, Helvetica, Sans-serif"
fontweight=bold
fontsize=4
fontstyle=roman
textalign=left
color=white
backgroundcolor=CX00365B;
style SystemTitle3 /
fontfamily="Arial, Helvetica, Sans-serif"
fontweight=medium
fontsize=2
fontstyle=roman
textalign=left
color=black
backgroundcolor=white;
end;
run;
%MACRO SEND_EMAIL_NOTIFICATION();
%IF &NUM_CONDS > 0 %THEN
%DO;
FILENAME SETMAIL EMAIL TO=( "hhhhhhhh@xyz.com")
SUBJECT = "Alert: XXXXXXXX"
TYPE="text/html"
CONTENT_TYPE='text/html';
ODS html3 BODY=SETMAIL
STYLE=MYMAIL;
TITLE "Some title 1 ";
TITLE2 As of &RUN_TIME;
TITLE3 A total of &NUM_XYZz Some titles, since the last report;
TITLE4 " " ;
PROC PRINT DATA=DEV.RECENT_DS noobs label;
RUN;
ODS HTML3 CLOSE;
ODS LISTING;
%END;
%MEND;
%SEND_EMAIL_NOTIFICATION();
最后通过创建自己的样式完成了需求。而不是使用 CSSSTYLE。不知道如何使 CSSSTYLE 工作。我认为 .msg 和 .html 输出导致了这个问题。