Answer the question
In order to leave comments, you need to log in
How to correctly send email from the site for certain user actions?
Good afternoon!
There is a site where users register, buy and activate services, recover passwords, etc. Now we have implemented sending letters (notifications) to users' emails during such actions on the site using the mail() function. The hoster has a limit on sending email ....pcs/month.
How to organize the sending of letters from the site so that there are no such restrictions?
Answer the question
In order to leave comments, you need to log in
Use transactional mail services. Some have ready-made libraries for integration, but usually everything is quite easy to integrate without libraries.
bash integration example:
curl 'http://api.mailhandler.ru/message/send/' \
-X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Secure-Token: <YOUR API KEY>' \
-d '{"from": "[email protected]", "to": ["[email protected]"], "subject": "Hello world!", "html_body": "<html><body>Hello dear user.</body></html>"}'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question