Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Jojoba on December 05, 2019, 07:20:58 PM

Title: My forum stopped sending emails
Post by: Jojoba on December 05, 2019, 07:20:58 PM
Yesterday I sent out an announcement for the first time to the entire membership. The error log shows a number of them could not be sent and since then no emails have been sent from the forum. I have no idea what happened or how to fix it. Can anyone help?

Thanks
Title: Re: My forum stopped sending emails
Post by: vbgamer45 on December 06, 2019, 12:54:10 AM
What is the error message? in the error log?
Title: Re: My forum stopped sending emails
Post by: SpacePhoenix on December 06, 2019, 03:27:03 AM
Ask your host if they've temporarily blocked you from sending emails. You might have fallen foul of a limitation imposed by your host on the total number of emails and/or frequency of emails sent per day
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 10:41:15 AM
I did talk to the host and they say the limit is 10,000 emails a day. With only 135 members I don't even come close to that. They said something about making some changes to the DNS and said it should work in a few hours...that was yesterday and no change.

The error log just says unable to send mail to each separate email address it tried to send to. I now have the queue enabled and there are about 10 messages in the queue. When I try the send queue now command nothing happens.
Title: Re: My forum stopped sending emails
Post by: vbgamer45 on December 06, 2019, 10:47:44 AM
I would post the error message to your host have them look into it. Hard to say without the complete error message.
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 01:59:48 PM
I have been trying to troubleshoot with the host and still the forum will not send out emails. Today it is not even showing an error log anymore...the emails just disappear as if they were sent, but no one receives them. I have replaced the scheduled tasks.php file with a backup from when it was working but that didn't make any difference. I have tried switching from php mail to smtp mail and the problem persists. Any suggestions as to where else the problem might be?
Title: Re: My forum stopped sending emails
Post by: vbgamer45 on December 06, 2019, 02:08:00 PM
It sounds like a host issue might have blocks on outbound smtp.
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 02:58:55 PM
The host is saying from their end everything seems to be working as expected. Any idea what file might have gotten corrupted? Is it possible that sending an announcement to all 136 members at one time caused some kind of overload? If so, where do I go to fix it?

Thanks for responding!
Title: Re: My forum stopped sending emails
Post by: Sir Osis of Liver on December 06, 2019, 08:28:26 PM
Try the attached.
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 10:08:32 PM
Ok, I downloaded the test mail.php file and uploaded it to the server in my public_html folder. However, I don't know how to run the script...when I go to the forum I'm not sure where to look for it...
Title: Re: My forum stopped sending emails
Post by: Sir Osis of Liver on December 06, 2019, 10:29:59 PM
It's a standalone script, just link to it directly.  You have to manually fill in webmaster address and mail to address.  If email is sent, you'll get white screen with 'Success!' at top, if not you'll see 'Fail...'.



<?php
// Add your name between quotes
$from_name "Your forum";
// Add the origin email address between quotes (the same email you set in SMF's Webmaster email address)
$from_email "webmaster address";
$headers "From: $from_name <$from_email>";
// You are free to change the body and subject of the test email in the next lines, but the default should work fine
$body "Hi, \nThis is a test mail from $from_name <$from_email>.";
$subject "Test mail from localhost";
// Add the destination email address between quotes (the recipient of the test email)
$to "mail to address";
// When running the script, you will see in your browser "Success!" or "Fail...", depending on whether the test was successful or not. DON'T CHANGE THIS
if (mail($to$subject$body$headers)) {
   echo 
"Success!";
} else {
   echo 
"Fail...";
}
?>




Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 10:39:01 PM
Sorry to be so dense but I don't know what you mean by standalone script or linking to it directly. How do I do that and where??? Was I correct in uploading the test mail.php to my server files? Or should I do something else with it?

  I did fill in the webmaster address and mail to address.



Title: Re: My forum stopped sending emails
Post by: Sir Osis of Liver on December 06, 2019, 10:47:29 PM
If the file is in /public_html, just link to www.yourdomain.com/testmail.php and it will run.
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 10:54:20 PM
Ok, thanks for your patience...that made sense. I did it and I got Fail. Now what?
Title: Re: My forum stopped sending emails
Post by: Sir Osis of Liver on December 06, 2019, 10:58:17 PM
Emails are not being sent.  Look in Admin -> Mail -> Settings, are you using php mail or smtp?
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 11:07:55 PM
Php mail
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 06, 2019, 11:21:02 PM
I decided to switch it to smtp again and I was able to get a personal message through using smtp. However, even when using smtp, I still get fail with the testmail.php script.
Title: Re: My forum stopped sending emails
Post by: Jojoba on December 07, 2019, 12:19:20 AM
Thank you everyone for your help! Perhaps someday I'll know enough to help someone else...