简体   繁体   中英

Catching Undeliverable or Spam Folder Email

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.

Emails are usually fire and forget, so there is no standard way of tracking them down. Having some third party send emails might reduce the chances of your mail getting sent to the spam folder, but sometimes, the mail client seems to learn what emails you delete without even reading and starts trashing the emails immediately.

That being said, you can take a look at this and this previous SO threads. Depending on the content of you mail, there might be some possibilities for you to get some sort of response back.

As for being able to check which email is valid or not, you might consider using some sort of activation mechanism. You basically send them a mail and in it you include a link to which the user will have to navigate to activate some sort of service. If the user activates the link, than you know that they have access to the given email account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM