Code Monkey home page Code Monkey logo

Comments (5)

bashorgru avatar bashorgru commented on July 28, 2024 1

There is a bug in Rainlab.User (at least in 1.2.1) plugin that blocks all subscribers for event 'mailer.prepareSend'. That's why this plugin will not work.
Replace this in Rainlab.User Plugin.php
Event::listen('mailer.prepareSend', function($mailer, $view, $message){ return MailBlocker::filterMessage($view, $message); });
with this
Event::listen('mailer.prepareSend', function($mailer, $view, $message){ return MailBlocker::filterMessage($view, $message) ? null : false; });

from oc-mail.

mafin avatar mafin commented on July 28, 2024

Unfortunately, it doesn't work. Tested via smtp and AWS SES. Mail has been sent, but no log items, no hidden images in mail body.

from oc-mail.

vojtasvoboda avatar vojtasvoboda commented on July 28, 2024

There is also bug in October core, it returns error:

[2016-04-23 20:02:48] dev.ERROR: exception 'ErrorException' with message 'Missing argument 6 for Illuminate\Database\Eloquent\Relations\HasManyThrough::__construct(), called in /usr/local/www/data/mysite.com/beta/vendor/october/rain/src/Database/Relations/HasManyThrough.php on line 22 and defined' in /usr/local/www/data/mysite.com/beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php:52

I already reported at https://github.com/octobercms/library/issues/209

So it also doesn't work for me, zero logged e-mails at all.

from oc-mail.

daftspunk avatar daftspunk commented on July 28, 2024

@bashorgru I'm having trouble seeing why this code change is necessary? The mail.prepareSend event will only halt if the value returned is === false, so these changes should not make any difference? Please submit a PR to the user plugin to discuss further.

from oc-mail.

bashorgru avatar bashorgru commented on July 28, 2024

Let's figure it out. It's simple.
First, \October\Rain\Mail\Mailer fire event 'mailer.prepareSend' with halt flag (code).
Next, \Illuminate\Events\Dispatcher as Event start propagating event through listeners, call that function setted from \Rainlab\User\Plugin and then stop propagating to the rest of listeners.
Propagating stopped because that function returns a result (boolean). But it should return null to allow processing the rest of listeners (read comments here).
I assume it's a bug in Rainlab.User. Issue link.

from oc-mail.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.