Answer the question
In order to leave comments, you need to log in
How do large sites deal with sending e-mail?
Can you please tell me how big sites cope with sending emails (notifications)? Do they use the PHP mail() function? And why aren't mailers blocking them?
update
I mean letters: reply notification, registration confirmation letters, etc.
Answer the question
In order to leave comments, you need to log in
Use third party services. If there are very large volumes, then it makes sense to use https://aws.amazon.com/ses/ the difference in price with the same mailchimp is quite impressive.
Usually mailing works over the SMTP protocol . For mailing, they use a message queue , use dedicated IP addresses and various E-Mail authentication methods: DKIM , SPF , DMARC , so that mail does not get into spam.
well, there are interesting swiftmailer libraries or the same PHPMailer, and if for good, then special services are used ala mailchimp
UPD for notifications and confirmations,
if we take PHP framers for example, then in the most modern ones, event technology is used, when, for example, a user has registered, an event is triggered and the event handler is thrown to the queue (redis, rabbitmq, etc.) to reduce the load on the current script execution, and then the queue asynchronously calls the event handler in which the letter is sent
because they use either third-party services, or endure sending letters to another server, possibly more than one, I doubt that they use mail ()
do not block mailers. they have their own mail server (service), they will not block themselves)
No, all sites that send emails use third-party services or set them up themselves. self-configuration
services
1. The author, forget about mail (), this dummy has not been accepted by Google and mail-ru for 5 years now completely from the word absolutely. On one, it gets into spam with the destruction of the body of the letter, on the other, as if there was no letter at all. At the same time, you don’t even need to send a bunch of test letters, the rejection starts from the first letter))) Yasha still somehow works, but the middle is half.
2. SMTP is a good panacea, including for stubborn Google and mail-ru. It is enough to replace 100 lines of the mail() function with 300 lines of SMTP code and everything is in chocolate. Checked on 800 emails per day. BUT - you have to implement a smart queue, such as with an interval of 5-10 seconds. Send in a batch - mail-ru begins to shift to the spam folder.
3.Use services for 3000-10000 per day, there are a billion of them and the prices are not expensive even for villagers like me!...)))
UPD . I doubt that the author needs thousands of letters a day. Here you can rarely meet Eldorado or Mvideo workers)))) Well, helping hackers has always been a shame , do you hear, the author ??!! well, judging by the nickname, everything is clear here))))
https://github.com/Supme/smtpRelay
but I did not implement sending from several IPs, so if you send, for example, more than 10-15 thousand to mail.ru in half an hour, then the restriction will work.
Well, do not forget about the true reverse of IP and SPF, at least.
I mean letters: notification of a response, registration confirmation letters, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question