BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I have an extract from SAS - List.

I can export it as a step in Project and it can be saved on my desktop or C: drive.(I use .xlsx format to do this)

 

However, what I want to do is send it as an excel attachment to an email address.

Can this be done?

 

Thanks !!

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Is this in SAS Enterprise Guide?  You can do this with two steps:

  • First, Export Data as a Step, saving the XLSX file in your local machine or remote SAS session
  • Then, select the XLSX file (which will be added to your project) and use Send Email as a Step, which will make this part of your process flow

 

sendemail.png

Before you can Send Email as a step, you will need to configure the SMTP e-mail options in Tools->Options, Administration.  You'll need your SMTP server name, port, and any other credentials.  A little bit more about that in this article.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

Is this in SAS Enterprise Guide?  You can do this with two steps:

  • First, Export Data as a Step, saving the XLSX file in your local machine or remote SAS session
  • Then, select the XLSX file (which will be added to your project) and use Send Email as a Step, which will make this part of your process flow

 

sendemail.png

Before you can Send Email as a step, you will need to configure the SMTP e-mail options in Tools->Options, Administration.  You'll need your SMTP server name, port, and any other credentials.  A little bit more about that in this article.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
new_sas_user_4
Quartz | Level 8

Thanks for the response!

The article you shared has information to setup gmail account.

How can I setup my outlook email for this process?

 

This extract needs to be sent via official email id

 

Thanks:)

ChrisHemedinger
Community Manager

Alas, you cannot use your Outlook client with this step.  Sending e-mail via Outlook uses the MAPI protocol (not SMTP), and automating this is usually not permitted for security reasons.  

 

However, if you have Office 365, you should be able to use an approach similar to the Gmail instructions, but applying the O365 settings.  See this article (Microsoft) for guidance about what those settings should be.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
new_sas_user_4
Quartz | Level 8

Thanks!

But we dont use office 365 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2971 views
  • 0 likes
  • 2 in conversation