BookmarkSubscribeRSS Feed
Arpit_Agarwal
Fluorite | Level 6

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:

E-Mail Access Device
 
ERROR: Email: 535-5.7.8 Username and Password not accepted. Learn more at
ERROR: Email: 535 5.7.8 https://support.google.com/mail/?p=BadCredentials y3sm19145222pfy.36 - gsmtp
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 1.60 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 2265.09k
OS Memory 29088.00k
Timestamp 09/11/2016 07:32:21 PM
Step Count 14 Switch Count 65
Page Faults 0
Page Reclaims 1277
Page Swaps 0
Voluntary Context Switches 236
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 0
 
Do the experts here have any help to offer? Please advise.
 
Regards,
Arpit
4 REPLIES 4
Reeza
Super User

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.

Cynthia_sas
SAS Super FREQ
Hi:
And, in addition to Reeza's reasons for why it isn't likely, another reason why it isn't likely is that in order to send email from a SAS program, there MUST be SAS e-mail options turned on when SAS starts up. And, since you do not have permission to alter the SAS start-up file, it is unlikely that this will work for you. Although, it IS possible to send email from SAS, once you are on a full system, where you can ask you administrators to implement the options you need to make it work.

cynthia
Arpit_Agarwal
Fluorite | Level 6
Thank you for your advice!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2904 views
  • 0 likes
  • 3 in conversation