Answer the question
In order to leave comments, you need to log in
How to send mail from php scripts without losing emails if the mail server is not available?
Colleagues, good afternoon.
Help, please, in resolving the issue.
There is a site on Bitrix. ssmtp is used to send mail (via php's mail() function).
The mail server (Postfix) costs in other place, territorially.
Website and mail server in the same domain (www.example.com and mail.example.com, respectively).
The problem is that if the mail server is not available for any reason, then the letter that poisons the site is lost and does not reach the recipient, because ssmtp does not queue or resend.
Tell me how to replace ssmtp and how to configure it correctly?
I understand that you need to install a full-fledged MTA, for example, postfix. It needs to be configured as relay? In this configuration, will it queue and resend messages that could not be delivered to the mail server (for example, with a connection timeout)?
Or maybe there is something better?
Answer the question
In order to leave comments, you need to log in
Yes, put MTA, it will try to send to a successful end (well, or how you set it up).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question