spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Campaign never marked as send with custom segment class #179

Closed YannikFirre closed 4 years ago

YannikFirre commented 4 years ago

Hello :)

PHP: 7.4.5 Laravel: 7.10.3 Mailcoach: 2.11.4

When i use a custom Segment class in campaign, the campaign is never marked as send always in progress.

RM : No issue if the segment return true for all the subscribers.

Example of Segment Class :

public function shouldSend(Subscriber $subscriber): bool
{
    if (! empty($this->languages) && ! in_array($subscriber->extra_attributes->language, $this->languages, false)) {
         return false;
    }

    return true;
}

Thanks

YannikFirre commented 4 years ago

Correction, the campaign remains "in progress" only if the class segment returns 0 or 1 subscriber.

Thanks a lot for this package, I launched 100 campaigns to 22k subscribers in one time, it worked like a charm ! :D

ziming commented 4 years ago

I got the Always in progress issue too.

riasvdv commented 4 years ago

Should be fixed in 2.11.6