Hello
I want to send an email from sas .
I want that one sentence (text) be in red color
FILENAME mail EMAIL
from="Ron.Dave@gmail.com"
TO=("Ron.Dave@gmail.com")
SUBJECT=" UPDATE"
encoding='utf-8'
CONTENT_TYPE="text/plain" ;
ODS LISTING CLOSE;
data _null_;
file mail;
put 'HELLO';
put style(header)={background=Red color=blue} "Here is my report";
put ' ';
put ' ';
put ' ';
put 'Dave';
run;
You need an SMTP e-mail host !
How to use Gmail to send a message from a SAS program - The SAS Dummy
I think you need
type='text/html'
instead of plain text !
Use SAS to send an email that embeds a graph in the body of the email - SAS Users
Ciao,
Koen
You will need code similar to the following:
filename mymail email
from="Ron.Dave@gmail.com"
TO=("Ron.Dave@gmail.com")
subject="Update"
type='text/html';
data _null_;
file mymail;
put '<html><body>';
put '<p>Hello</p>';
put '<p><font color="blue">Here is my report</font></p>';
put '</body></html>';
put '</html>';
run;
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.