sas Sending an email with SAS Sending a SAS email with an HTML body


Take note of the email type: Type = 'text/html';

Filename myEmail EMAIL
    Subject = "My Email Subject"
    From    = ""
    To      = ''
    CC      = ''
    Type    = 'text/html';

Data _null_; File myEmail;
            table, th, td {
                border: 1px solid black;
                   border-collapse: collapse;
        <p>Here is your email</p>
        <p>Go ahead, organize your data within an HTML table tag here!</p>
                    column 1
                    column 2

It is very possible that after building out an HTML email in SAS, you find the HTML is distorted when you receive the email. This is a result of SAS putting breaks to the next line in the text of your PUT. A break was probably placed right in the middle of one of your tag's text. Should this happen to you, try moving your HTML tags around. It may not be pretty, but you may have to have some tags share a line to avoid this happening. This happened to me, and this is exactly how I fixed that issues.