mail("daemon_07@list.ru", "the subject", 'some text', "From: info@example.ua \r\n" ."X-Mailer: PHP/" . phpversion()); 

The function sends 2 letters each, although only one should.
This is all the code, the file is clean, only this function.

  • 2
    write all the code where you got this function. and it's time to start taking answers to questions! - Artem
  • this is all the code, the file is clean, only this function - Oleg Zagorodniy
  • one
    crooked means php is configured. - Artem
  • What could be the problem? - Oleg Zagorodniy
  • 2
    > what could be the problem? in the "programmer" - Artem


2 answers 2

The mail() function in your code is called only once. This means that she also sends only one letter. Miracles in programming does not happen.

I think that you run this code not in the console but by opening the page through a browser. Most likely you just load the page twice. This may be for various reasons. And this is another topic.

And how, in the comments, said @Shrek : "it’s time to take answers to questions." So, please, go through the list of your questions and tick the question that helped you.

    My metric runs a second time for some reason, so I had to put a check in the code.