📜 ⬆️ ⬇️

Mail service with feedback principle

All (and if not all, many) modern mail services are based on a bunch of very old, but time-tested POP3, SMTP protocols or, rarely, IMAP4. POP3 protocol allows you to receive mail, SMTP - send. IMAP4, on the other hand, differs from POP3 only in its advanced means of storing and searching mail on the server (I’m on purpose exaggerating, do not pay attention).

We create a letter, click "Send". There is a connection with the SMTP server, the letter is sent. We click “Receive”, the mail program connects to the POP3 server, checks for the presence of letters and, if any, merges them into the computer. It's simple.

But what to do if I want to receive a letter, not thirty-three times checking the mailbox, but one, guaranteed? Modern popular mail services allow you to connect the service "notification to the mailbox." The question is, what's the point? Will I have to check one box to find out about receiving a letter to another? Rave. There is also a service "notification to the mobile phone." But this option does not suit me personally, because it requires money. And I would be careful to call prompt reception of mail through this service.
')
And here an idea arises (I’m not the first who came to me, I'm sure!) Of the mail service with the principle of feedback. I will describe one of the options for implementing this feedback below. The client program, together with the standard functions for receiving messages, includes a small smtp-server (small letters for a small service) that can only accept notification of a new letter. In the body of the notification, you can already transmit any information, such as the name of the sender, the time of receipt of correspondence or the letter itself. Thus, you can save well on traffic (we do not frantically check the mail countless times, but just wait for the notification), somewhat increasing the server load with an extra operation (although we will immediately unload it by reducing the number of hits).

I repeat, this is just one of the ways to organize the interaction between the server and the client. You can also consider notifications on IM, but the value is just in automating the process and its transparency to the user.

What do you think about this?

Source: https://habr.com/ru/post/4911/


All Articles