I am trying to generate bulk emails through SAS, based on instructions of this SUGI by Eric Tilanus.
I cannot put a line break and all the put statement products appear in the same line in the email body.
I am using SAS 9.4. Sample code is below.
Do you know how I can get a line break?
data _null_;
length body $1024;
set DSIN end=last;
file outbox;
put '!EM_TO!' email;
firstLine= catx(' ',"first line",put(dttm,datetime19.), "blah");
put firstLine;
/* how can I get a line break here? */
put "second line";
put '!EM_SEND!';
put '!EM_NEWMSG!';
if last then put '!EM_ABORT!';
run;
Here is the email body generated:
first line 06JUL2015:21:25:40 blah second line
UPDATE: This post has useful info. Outlook truncates line breaks. Putting two spaces before the string bypasses Outlook's automatic line break truncation.
"; as workaround, if HTML-E-mail is an option in your process.... – kl78 Jul 06 '15 at 22:16