A
A
Alexander Kovalchuk2015-12-24 18:52:20
PHP
Alexander Kovalchuk, 2015-12-24 18:52:20

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

3 answer(s)
Q
Q4Dizzy, 2015-12-24
@mamut

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.

R
Rikcon, 2015-12-24
@Rikcon

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.

A
Alexander Leonovich, 2015-12-24
@atlantech

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 question

Ask a Question

731 491 924 answers to any question