0

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.

Community
  • 1
  • 1
jaamor
  • 317
  • 2
  • 14
  • 1
    Isn't it just something like "Extra line breaks were removed by Outlook" case? – vasja Jul 06 '15 at 21:50
  • Yes, this seems to be the issue. Putting two spaces does the trick. – jaamor Jul 06 '15 at 22:07
  • 1
    also you could use content_type="text/html" and put "
    "; as workaround, if HTML-E-mail is an option in your process....
    – kl78 Jul 06 '15 at 22:16

0 Answers0