Friday Puzzler: Mail Alerts

This one is rather simple, but as it involves string manipulation, I thought it might be fun.

Write a simple UDF that takes a mail server, username, and password, and a keyword. This script will check all the mail on the account and return a list of messages that match the keyword. It should NOT delete the mail, but just download and parse.

What would this be used for? Imagine an account you do not check often but want to monitor for certain keywords (“I’m going to sue you!”, “You stink of elderberries!”). This code could be used on a scheduled basis to simply see if something important is in the queue.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA https://www.raymondcamden.com

Comments