Sie sind hier

Testing e-mails ✉ ✓, Backend. Part 4

Gespeichert von Thorsten am 18. November 2018 - 15:33

Some numbers you should know, when sending out e-mails:
When an e-mail template is used, the behaviour is monitored and the behaviour of all existing e-mails in our system.
There are such details like the opening and click numbers, or if the email was able to reach the recipient at all.

One useful information is the status code of the receiving mailserver:
For that we need to know how the way of the e-mail does look like:

  • Our templating system generates the e-mail with header + body + attachments and
  • gives it to our outgoing mailserver, which handles the communication with
  • the receiving mailserver, from where
  • the e-mail client of the user will fetch the e-mail.

    The status information from the receiving mailserver is the best feedback we can get for every e-mail.
    We do not know at this point if the user received or even read the e-mail. It just tells us, we did all we could at this point to potentially get the e-mail to the user, in his inbox - or we failed.
    The monitoring starts by detecting undeliverable e-mails by the recipient address, so called hard-bounces or status code 5xx, see SMTP protocol https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#Protocol_ove...

    The recieving mailserver gives a status message/code and what it did with the e-mail.
    In case, and depending on the errors, the sending mailserver tries several times to deliver this e-mail with increasing waiting times.
    Every time the server comes back with a bad message, it's a bounce.

    If he tries again to deliver it is a soft-bounce, if he gives up we end in a hard-bounce https://en.wikipedia.org/wiki/Bounce_message.
    There are some harmless bounces, like: 'Please try again.' - to get rid of spammers who just try one time to send an e-mail and do not care if it succeeds or not.
    So our mailserver tries again after some minutes to deliver the e-mail and succeeds - also known as greylisting https://en.wikipedia.org/wiki/Greylisting.
    It is very common to find this in your logs, you do not need to worry about this.

    Taking care about the hard-bounces and handle them appropriate is essential and important to keep up a good reputation of your sending e-mail server IPs!
    If you get a hard-bounce, increase the time, before you try to send any new e-mail again to this receiver until you get a 2xx success code again.
    Major e-mail domains punish your IPs if you send blindly again and again generating hard-bounces, with that you show you do not care about unrecoverable errors.
    It will end up in not accepting any e-mail for delivery from these servers.

    Even if you send successful e-mails with code 2xx - if you can not see the recipient actively interacting with any e-mail for a longer time, think about removing the recipient from that sort of 'information'.
    It would show your respect to the user, that he silently ignores you - by silent voting.

    Look into the next part of backend: Tracking: https://einmanaleiki.de/testing-e-mails-tracking-part-5-34

  • Tags: