You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if i run a job or command that is tenant aware it only changes the 'mail.from.address'
the mailers.smtp is the one off the first tenant it loads.
class SendEmails extends Command
{
use TenantAware;
protected$signature = 'send:emails {--tenant=*}';
protected$description = 'Send Emails to completed orders';
publicfunctionhandle(Mailer$mailer)
{
$this->info('Start ' . $this->description);
$this->line('The tenant is '. Tenant::current()->name);
$mailer->to('[email protected]')->queue(newTestNotificationMail());
$this->info(config('mail.mailers.smtp.username')); // this is always the first loaded tenant -> how can i reset this mailer?
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When i send an email on load time i can update the mailer with a switch mailer task. This works.
But if i run a job or command that is tenant aware it only changes the 'mail.from.address'
the mailers.smtp is the one off the first tenant it loads.
I already tried to clear mailer and mail with
Is there anyone how can help me how to clear the mail.mailers. in a job or command or how i could use a mailer per tenant?
Beta Was this translation helpful? Give feedback.
All reactions