SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
IChatterji
Fluorite | Level 6

Hello,

I am trying to keep a copy of emails that I send using SAS in my "Sent" folder. I am able to successfully send emails but the emails do not show up in my "Sent" folder. My current workaround is to mark a copy of the emails to myself, so as have a copy in my "Inbox". However, I have recently come across the following code snippet in C# that I am hoping to add to my SAS code. I will appreciate any tips/ relevant papers in the right direction.

Append the sent mail to the “Sent” folder using the IMAP protocol in C#:

 

            using (var client = new ImapClient())

            {

                client.Connect(_host, _imapPort, _useSsl ? SecureSocketOptions.SslOnConnect : SecureSocketOptions.None);

                client.Authenticate(_user, _pwd);

                IMailFolder sentFolder = client.GetFolder("INBOX.Sent");

               _ = sentFolder.Append(mailMessage);

                client.Disconnect(true);

            }

 

best wishes,

IC

1 REPLY 1
rudfaden
Lapis Lazuli | Level 10

Would it be better to make a textfile or dataset and write information on the email you send to that file.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 683 views
  • 0 likes
  • 2 in conversation