esotalk / esoTalk

Fat-free forum software.
GNU General Public License v2.0
1.47k stars 239 forks source link

Add better SMTP error handling #418

Open tvb opened 9 years ago

tvb commented 9 years ago

It seems the SMTP plugin is giving me problems. I'm not sure for how long this has been a problem but it might be for quite some time..

SMTP Error: data not accepted.
The error occurred near ../core/lib/vendor/class.phpmailer.php:1234

1232:         //Only send the DATA command if we have viable recipients
1233:         if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) {
1234:             throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
1235:         }
1236:         if ($this->SMTPKeepAlive == true) {
Backtrace
PHPMailer->smtpSend() [../core/lib/vendor/class.phpmailer.php:1038]
PHPMailer->postSend() [../core/lib/vendor/class.phpmailer.php:945]
PHPMailer->send() [../core/lib/functions.general.php:229]
sendEmail() [../core/controllers/ETUserController.class.php:269]
ETUserController->sendConfirmationEmail() [../core/controllers/ETUserController.class.php:227]
ETUserController->action_join()
call_user_func_array() [../core/lib/ETController.class.php:181]
ETController->dispatch() [../core/bootstrap.php:326]
require() [../index.php:19]
Additional Information

esoTalk Version (code) 1.0.0g5
esoTalk Version (config) 1.0.0g5
PHP Version 5.5.9-1ubuntu4.5
Operating System Linux
Server Software Apache/2.4.7 (Ubuntu)
Referer https://www.domain.com/user/join?return=%2F
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5
Request URI /user/join
tvb commented 9 years ago

The user is however registered just fine.

tvb commented 9 years ago

Ok, im not sure what the problems was. But it might have something todo with the following error.

550 5.4.5 Daily sending quota exceeded

I had a spam run on my forums with over 1500 users created in a very short amount of time.

jgknight commented 9 years ago

@tvb have you since resolved this issue? Perhaps adding some more error handling around this problem will help.

tvb commented 9 years ago

Yes, perhaps. I am still not sure what the initial problem was. Maybe update the mailer class completely and add more error handling could help.