Answer the question
In order to leave comments, you need to log in
How to set up sending mail on hosting?
After moving to a new hosting, sending mail stopped working, and if you send it like this, it displays ok, which reduces my suspicions about the hosting, what could be the problem and what needs to be configured, BILLmanager is installed on the hosting
$result = mail('[email protected]', 'subject', 'message');
if($result)
{
echo 'ok';
}
else
{
echo 'no';
}
Answer the question
In order to leave comments, you need to log in
The easiest way is to write to the support service .. It is easier for them to identify the cause of the problem .. Settings, mailers and everything else do not always match on all hostings.
To have full control over how mail is sent, don't use mail()
https://github.com/PHPMailer/PHPMailer
Use this library, and set the SMTP servers, etc. yourself.
OK means that the message was successfully prepared for sending. There is no guarantee that it will reach the addressee. Try to use Q4Dizzy 's advice and check your spam for sure, it happens sometimes))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question