Hello All,
Following is the program that sends an email...The issue is that I would like to see the proc print below the texts without any line/breaks in the mail, so that in the mail you see every sentence in the next line:
FILENAME OUTPUT EMAIL
SUBJECT = "Test email SUBJECT"
TO=('abc')
type='text/html'
;
ODS LISTING CLOSE;
ods html body=OUTPUT
;
title;
proc odstext;
p "test1";
p "test2";
run;
proc print data=sashelp.class; where name='Alfred';
run;
proc print data=sashelp.class; where name='Alfred';
run;
proc odstext;
p "test3";
p "test4";
run;
ods html close;
According to this: https://support.sas.com/kb/23/630.html
that seems to be doing the job:
ods all close;
ods html file='temp.html' headtext="<style>p,hr {display:none}</style>"
style=htmlblue
;
proc odstext;
p "test1";
p "test2";
run;
proc print data=sashelp.class; where name='Alfred';
run;
proc print data=sashelp.class; where name='Alfred';
run;
proc odstext;
p "test3";
p "test4";
run;
[EDIT]
For html5 try this: https://support.sas.com/kb/57/526.html
Bart
Hello Bart,
Thanks for the mail.
But I still see the horizontal line in the email:
Thanks
Mushy
Hello,
I managed to find the solution by updating the pagebreakhtml option in a custom style:
proc template;
define style styles.nobreak;
parent=styles.htmlblue;
style body from body /
pagebreakhtml=_undef_;
end;
Thanks
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.