How to configure the mail() function in php?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
Can't make sending letters in the mail ,here's the code:
<?php$to= "xxxxxxxxxx@mail.ru" ;$message="Помагите";$subject = "Birthday Reminders for August";$headers = 'From: qwer@tyui.op';mail($to,$subject, $message, $headers);?>


displays this error:
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\\xampp\\htdocs\\MySite\\index.php on line 7

PLEASE EXPLAIN WHAT TO DO?IN THE ARTICLES IT IS CLEAR NOTHING !!!!!!!!!!!!
by | 4 views

1 Answer

0 like 0 dislike
From the mail() function more harm than good, because to use it seriously impossible, but see it in the documentation and take a panacea. Follow the advice Alex, Niemiro: get PHPMailer.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 14, 2019 by Barrakuda74
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,996 users