This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

johnytributante17670
johnytributante17670

Hi I tried to sent email with carbon. So I addet this in my carbon:

* * * * * php /var/www/myname/projects/myproject/artisan schedule:run >> /dev/null 2>&1

Then in plugin i overwrite method like this:

public function registerSchedule($schedule)
    {
        $schedule->call(function () {
            Newsletter::instance()->sendNewsletterEmails();
        })->everyMinute();
    }

And my method look like this:

public function sendNewsletterEmails(){
        $emails= $this->getNewsletterEmails();
         $mail = new Mail('newsletter', [
            'emails' => $emails,
            'subject' => $this->title,
            'data' => [
                'content' => $this->content,
            ]
        ]);
        $mail->send();

        return true;
    }

But nothing happened. Anyone see where i make mistake?

chris10207
chris10207

hi, did you find the solution to your problem ?

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.