teamforus / zuidhorn-backend

0 stars 1 forks source link

Emails with QR-code blocked by spam-filter #46

Closed danrminds closed 6 years ago

danrminds commented 6 years ago
Swift_TransportException: Expected response code 250 but got code "550", with message "550 5.7.1 Our system has detected that this message is likely unsolicited mail (SPAM). To reduce the amount of spam, this message has been blocked. (3yTgt756Psz12N92)
" in /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
Stack trace:
#0 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(281): Swift_Transport_AbstractSmtpTransport->_assertResponseCode('550 5.7.1 Our s...', Array)
#1 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(270): Swift_Transport_AbstractSmtpTransport->executeCommand('\r\n.\r\n', Array, Array)
#2 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(333): Swift_Transport_EsmtpTransport->executeCommand('\r\n.\r\n', Array)
#3 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(428): Swift_Transport_AbstractSmtpTransport->_streamMessage(Object(Swift_Message))
#4 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(444): Swift_Transport_AbstractSmtpTransport->_doMailTransaction(Object(Swift_Message), 'no-reply-testin...', Array, Array)
#5 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(176): Swift_Transport_AbstractSmtpTransport->_sendTo(Object(Swift_Message), 'no-reply-testin...', Array, Array)
#6 /var/www/forus-backend.forus.io/php/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(85): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#7 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(443): Swift_Mailer->send(Object(Swift_Message), Array)
#8 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(217): Illuminate\Mail\Mailer->sendSwiftMessage(Object(Swift_Message))
#9 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Mail\Mailer->send('emails.voucher-...', Array, Object(Closure))
#10 /var/www/forus-backend.forus.io/php/app/Jobs/MailSenderJob.php(55): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
#11 [internal function]: App\Jobs\MailSenderJob->handle()
#12 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#13 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#14 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#15 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#16 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#17 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(114): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\MailSenderJob))
#18 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\MailSenderJob))
#19 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#20 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(42): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\MailSenderJob), false)
#21 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(69): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#22 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(317): Illuminate\Queue\Jobs\Job->fire()
#23 /var/www/forus-backend.forus.io/php/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(267): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue
jamalv commented 6 years ago

@timonback could you have a look if there is anything you can do about this?

This is the most important email we are sending people.

timonback commented 6 years ago

Looks like a message from Googles Mail system We configured on our side special parameters to avoid being accused of SPAM. As this is only a single message (hopefully), I would just try to send it again later. Processing the emails from a queue and logging them is a good practice in general.

dev-rminds commented 6 years ago

No only a single meesage. Any email that will contain a QRcode gets blocked (the confirmation of activation of the voucher, and sending the QRcode to email option.

timonback commented 6 years ago

Then there has be something weird with the qr code. Or is is because of the way the qr code is included and recognized as Image Spam (https://en.wikipedia.org/wiki/Image_spam). How much text is around the image? Is there a chance to instead not send it as an image, but as a pdf, so that it can be printed?

jamalv commented 6 years ago

@danrminds, @timonback Unfortunately, this issue is still critical. How can we fix it?

jamalv commented 6 years ago

For some reason the email does work if I click "stuur per email" on my user account.

screen shot 2017-11-07 at 08 36 12

screen shot 2017-11-07 at 08 34 45

jamalv commented 6 years ago

Just found out that manually sending works on live, but not on test. @timonback, did you change anything? I hope you did 🙏

jamalv commented 6 years ago

we don't seem to have had any issues with this anymore, closing