MyBB Community Forums

Full Version: Mail error on my forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello,

i get mail error on my forum
forum not sending email to user

i use this code to test
<?php
     error_reporting(E_ALL);
       $to = 'YOUR_EMAIL_ADDRESS';   ---> my email
       if(mail($to, 'Testing mail', 'This is a mailing test to see if PHP mail works.'))
       {
        echo 'Mail was sent by PHP';
       }
       else
       {
        echo 'PHP could not send the mail';
        print_r(error_get_last());
       }
    ?>

Mail was sent by PHP

https://ziuma.com/test.php

but i don"t receive any email
what does the meaning
Your host may have restrictions set on PHP Mail functions.
https://docs.mybb.com/1.8/faq/mail/#host-restrictions

Check with your webhost to see if there are any restrictions in place for sending mail via PHP.

--

It is suggested that you should use SMTP.
(2023-10-03, 01:27 PM)Taylor M Wrote: [ -> ]Your host may have restrictions set on PHP Mail functions.
https://docs.mybb.com/1.8/faq/mail/#host-restrictions

Check with your webhost to see if there are any restrictions in place for sending mail via PHP.

--

It is suggested that you should use SMTP.

how to setting SMTP?
Admin CP -> Configuration -> Mail Settings
Change Mail handler to SMTP mail and fill require fields