I want to show you a simple ajax form for the site, you can easily customize it for any of your tasks.
Due to the code: $domain = $_SERVER ['SERVER_NAME'];
ajax form receives technical e-mail server for guaranteed delivery of messages from the site.
This piece of code letters easily delivered to the mail recipient www.mail.ru
If you have any questions for me, I will be happy to answer: https://pinchukov.net