I have some automated functionality built into my web app that sends email daily to remind customers of appointments etc. Basically I use an auto scheduler that starts each morning at 7 am, checks the database for customers that need to be emailed, and sends the messages. This is great, but beyond actually sending the email I am completely in the dark.
- Can I somehow verify that an email address is actually a real email and the email has been successfully sent?
- What about checking for messages that were delivered to a spam folder of some sort?
- Diving even further...I know there are email services out there that can provide statistics based on the amount of people who actually opened the email. How do I check for this sort of thing?
My understanding is (at least for my first question) that I need to check the sender email address for returned or undeliverable emails and deal with them accordingly, but how do I do this programatically with Java? Do I need to implement another automatic daily process that checks an email account for undeliverable emails, handles the error, then removes the message? I assume that because of relay servers etc, an undeliverable error will not be available immediately because of relay servers etc.
I understand this is a slightly vague and loaded question so i'm not necessarily looking for a complete solution, but more or less some advice that will help me get started. I'd rather not use an external service.