MyBB Community Forums

Full Version: forum does send mail well
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a problem with sending mails like: mass mail and registration mail

I use as mail handler: php
I did make a test code and get the message that it works. I send a few mails as mass mail and it works.

<?php
error_reporting(E_ALL);

$to = 'your email address;

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';
}
?>

so I was ready to send a complete mass mail to all my user (3000) I find out that lots of mails are coming back so I did the test again and then it said

PHP could not send the mail

What is wrong.
Just a guess that the accounts you're trying to send to no longer exist.
But i did the code (by running this code you can see if php can send mails) as above twice. the first time it works and later on today not. And till now still not working.
At this moment i also cannot send a mail to myselfes (and my mailadress works).
You should look into your mail logs. Put more data on the fail too like which email addresses failed.
Like I said.
I did a mail test with a code that I found here on the board (see first post). When you run this you will get a message if the php mail works.

Before sending the mass mail the code said that php mail sending is ok
After the mass mail the code said php could not send.

I tried again to send a mass mail to only me and in the log I read: MyBB was unable to send the email using the PHP mail() function.

And as parameter in the mail settings for php handler I use the mail [email protected]
Do you have any mail related log item in your PHP error log, or HTTP server log, or system log?
MyBB was unable to send the email using the PHP mail() function.
mail() isn’t installed on your server - or is blocked outbound. Common with shared hosts as this is a vector for spam.
(2019-11-30, 09:26 PM)noyle Wrote: [ -> ]Do you have any mail related log item in your PHP error log, or HTTP server log, or system log?
(2019-11-30, 09:35 PM)spinning Wrote: [ -> ]MyBB was unable to send the email using the PHP mail() function.

Again: Do you have any mail related log item in your PHP error log, or HTTP server log, or system log?

With your issue, forget about MyBB error messages - that's just 'application' errors. To investigate the mail disfunction, you needs to step downwards on server/service layer.
If you've administrative access to your web service then it is important to 1. check the mail functions to be enabled and 2. to have a look at the server/system logs. Your webserver/PHP is giving a lot of details that may help to determine the problem.
Do you have such access to your webserver for investigation?

[ExiTuS]
(2019-12-01, 12:17 AM)[ExiTuS] Wrote: [ -> ]
(2019-11-30, 09:26 PM)noyle Wrote: [ -> ]Do you have any mail related log item in your PHP error log, or HTTP server log, or system log?
(2019-11-30, 09:35 PM)spinning Wrote: [ -> ]MyBB was unable to send the email using the PHP mail() function.

Again: Do you have any mail related log item in your PHP error log, or HTTP server log, or system log?

With your issue, forget about MyBB error messages - that's just 'application' errors. To investigate the mail disfunction, you needs to step downwards on server/service layer.
If you've administrative access to your web service then it is important to 1. check the mail functions to be enabled and 2. to have a look at the server/system logs. Your webserver/PHP is giving a lot of details that may help to determine the problem.
Do you have such access to your webserver for investigation?

[ExiTuS]

As I wrote PHP could not send the mail so there is no log on my mailserver (checked)

i understand that when an emailadress is deleted or the messagebox is full i get a message back. but that is not the problem.

The problem is, it looks like that whem i am sending those mass mail by php, after 20% or something the function does not working anymore. 

It looks like that I may not send so much mails at one moment and that the function is blocked for a while. At this moment I am able to send a few mail (or the system by new registration). I am sure when i send again so many mails i had to wait till tommorow for sending again.

This video tells exactly what I did and what happens.

https://youtu.be/HZqH-oMBJPs
Pages: 1 2