I created an account for Online SAS Studio using https://odamid.oda.sas.com/SASStudio/ for practicing my SAS skills.
Following Chris Hemedinger blog (http://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/), I tried to implement the learning.
I intend to send email TO gmail, for which if I use following lines and it works like a charm (read on to get to know the problem)
filename myemail EMAIL
to="myuserid@gmail.com"
subject="Hi";
data _null_;
file myemail;
put "Hello Friend";
run;
filename myemail clear;
However, when I use below lines of code on top of that, it errors out,
options emailhost=
(
"smtp.gmail.com" port=587
STARTTLS auth=plain
id="<my-gmail-userid>"
/*pw="my-gmail-password" */
)
;
So basically it's erroring out when I am trying to use GMAIL as a SENDER.
I have already done the following :-
a) Enabled "Less secure apps" on my Gmail account in order to send e-mail from a non-Google application (including SAS).
b) Tried port 587, and STARTTLS instead of SSL.
Here is what the log looks like,
NOTE: The file MYEMAIL is:
Not likely.
To send email you need access to an email server and the online version won't have it. But you know it's possible if you ever do need to do this.
Remember that these are learning editions, not full editions of SAS.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.