Testing email sending capability of your server


If you find that email is not delivering. You can test this way whether your server is capable to send email. Write a php script with following contents-

$to = '[email protected]'; # Use your own email address
$subject = 'Testing';
$message = 'Hello world!';
$headers = 'From: [email protected]' . "\r\n" .
    'CC: [email protected]';

    echo 'Email sent'; # Mail function is enabled in your server and PHP tried to send email.
    // It still depends on the receipt server whether it accept the email or mark as spam.
    echo 'Sending email does not work';

Another option is using SMTP.

In ClodOnex we have used PHPMailer-

And SMTP credentials are stored in Database.
To enable SMTP for sending Email.
Go to Settings > Email Settings
In Settings choose SMTP.

SMTP is better as it will increase chance the email will be send to Inbox instead of SPAM or Junk Folder.