What would be a good strategy for getting a mail delivered at a specific time e.g. 20:00:00, while also ensuring it does not get delivered even a second too early.

I'm trying to apply somewhere. There are only a few spots available and they choose based on the order the applicant's emails arrive after the registration opened. Emails that arrive even a second too early are ignored.

I know about plugins that can send an email at a specific time. But I'm wondering if there are any other (better) possibilities. Is it possible to set a header in the email containing a time? How could I smoothen out the SMTP delivery process? etc.

  • 1
    The only way to guarantee it would be to have access to their mail server and place the email there directly. There are too many servers, relays and other inserting their own delays to be able to guarantee an exact delivery time. Email should never be used for time critical purposes. This also raises the question of time synchronisation. Is whatever time their system "opens" synchronised to a tier 1 internet time server? If not, or if they do not use a time server at all then you cannot guarantee that their time agrees with your time making this nearly impossible. – Mokubai Jun 20 '18 at 11:44
  • 1
    If this is to work in any meaningful way then they need to send out an "applications now open!" Message that you can trigger on which makes your question moot. – Mokubai Jun 20 '18 at 11:46
  • If it is just someone in HR looking at timestamps on emails, that is controlled by the sending client. Change your system clock and there it is. If someone is reading the actual headers, then it gets harder... – ivanivan Jun 20 '18 at 12:19
  • @Mokubai That's what frustrating me, they only gave me a time, and then you just gotta hope your email magically is the fastest and their own time is configured correctly. – Boyd Jun 20 '18 at 12:36
  • @ivanivan I think they just look at their e-mail client. – Boyd Jun 20 '18 at 12:36

You can't

Because of how email works, this is entirely impossible.

Your mail client will deliver the message to your server, which will then pass the message on to another server, etc... until finally the message is passed to the destination server. Even then, the target user's mail client needs to recieve and view the message.

Due to this chain, it is impossible to guarantee that a message will be delivered to the final system with any degree of accuracy - also, which is the "final" system? The server or your mail client?

In fact, the whole system incorporates retries, allowing any of the links to fail and for the message to get "stuck" on a server for an undefined period of time.

Finally, as Mokubai as mentioned in comments... time is a tricky topic. All clocks run at different speeds, and while many systems use NTP these days, this still has gotchas - for example, what if the message was delivered at 20:00:00 and 999999 micro seconds... do you include it?

Aside from the synchronisation issues, you have trust issues as soon as you consider using timestamps from other systems.

Mokubai's point of using an "Applications Now Open!" message will solve your problem, because the receiving system has conveyed its state to you, which you can then react to.

You cannot possibly send a message before the window opens, because you've received the notification of the window opening (which took some time to travel to you).

If the window is only open for a short period, or if there is a "race" to get the first message, then I'd suggest that email is not the appropriate tool for the job.

  • 1
    Your answer is way more complete, I have deleted mine. – gronostaj Jun 20 '18 at 11:55
  • Sorry! as a result I felt the need to expand further... – Attie Jun 20 '18 at 12:06
  • Thanks for your answer. I agree that e-mail is a weird way to handle a first-come first served method. Sadly it's the way they are doing it right now. I'm afraid it comes down to stupid luck wether my email is the first one they receive. – Boyd Jun 20 '18 at 12:28
  • Note though that it is possible to ensure it gets sent (just not delivered) at an exact time, you just make sure you send it then. Realistically, this will usually translate to it being delivered to the final server (which is where the 'received' timestamp most email clients show comes from) within at most a few dozen seconds. – Austin Hemmelgarn Jun 20 '18 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.