BookmarkSubscribeRSS Feed
DJENS
Calcite | Level 5

Hi, we have a list in an Excel spreadsheet of email addresses that production reports go out to each day.  The spreadsheet is read each day and the resulting email addresses are used to distribute reports.  But...the problem is that we often have people that leave the company and we are not aware of them leaving and so the report gets sent to an orphaned email address.  Is there a simple way of having the program go out each morning and poll the corporate email server and give us a list of the email addresses that are no longer in our system?  Not sure if I am giving enough information but it's a start I guess.

 

Thanks much for any advice as to whether this is even possible.

 

Dave

2 REPLIES 2
Reeza
Super User
You can connect to your LDAP server to read in the list of emails that are valid and then compare it against your excel list that is imported to remove the addresses that are no longer valid. You can also write a process to capture emails that bounce and pull them off your list 'semi-manually' by not sending to that email in the future. But if an email gets re-activated that's going to be a problem.
Patrick
Opal | Level 21

To add to what @Reeza wrote:

A lot of sites synchronize users in SAS Metadata with LDAP/AD. A sample script for such synchronization comes as part of any SAS installation (importad.sas) and you could use this script as a starting point for your own code.

http://support.sas.com/kb/40/628.html 

 

Should you only send emails to users which are already defined in SAS Metadata then there is also SAS macro %MDUEXTR readily available which pulls such information from SAS Metadata. Just try and execute %MDUEXTR (LIBREF=WORK); 

https://go.documentation.sas.com/?docsetId=bisecag&docsetTarget=n024i4nqa5b12qn1lfek77h69ns5.htm&doc... 

 

And last but not least:

It might also be worth to check if such email addresses aren't already available in some EDW table. Employee information is sensitive so you might have to ask around internally to find out if such email information could be made accessible to you. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 2 replies
  • 400 views
  • 2 likes
  • 3 in conversation