This is the first piece. After this, I will add some Spark Machine Learning to intelligently reply to emails from a list of pre-trained responses. With supervised learning, it will learn what emails to send to whom based on subject, who an email is from, body content, attachments, time of day, sender domain, and many other variables.

For now, it just reads some emails and checks for a hard-coded subject.

I could use this to trigger other processes, such as running a batch Spark job.

Since most people send and use HTML email, I will send and receive HTML emails to make it look more legit.

I could also run my fortune script and return that as my email content, making me sound wise, or pull in a random selection of tweets about Hadoop or even recent news, making the email very current and fresh.