I’m trying to add a
mail()function on your server. I don’t know how to do it. Help. Installed local server
Answer 1, authority 100%
Put yourself any SMTP server on your computer. Set it to forward letters through any of your mail. In the PHP settings, set its ip and port, to which you will configure and the rest, that’s all. When contacting, the script will look in the settings where to contact and calmly send letters through your smtp server.
P.S. what to look for-
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 25
This is where you change the port if you set it to something other than the 25th or IP if the server is on another machine, on the network.
P.P.S. For example, at one time I just set up the provider’s server on the SMTP. He always has such a passwordless server for his subscribers, but with a limit of sending 100 letters per day and 10 per hour. But it was enough for my needs, because I also did just checking soaps and sending notifications.
Answer 2, authority 40%
What OS do you have? Vista.
I can advise you not to use mail(), take the PHPMailer class, configure it to the yandex.ru server via SMTP. The examples for the class are quite sensible in describing how to customize this class.
Answer 3, authority 20%
I think it would be easier to upload the script to some hosting and check it there. If anything, I can help with hosting and allocate a folder on the ftp-shnik.
Answer 4, authority 20%
In the code, just test by the !mail() condition, then upload it to the server and check if the letters reach.