【问题标题】:Want to sent mail to different mail id's of a user using Laravel Mail Notifcation想要使用 Laravel 邮件通知向用户的不同邮件 ID 发送邮件
【发布时间】:2017-06-03 05:01:13
【问题描述】:

Company.php

public function routeNotificationForMail() {
    return $this->office_mail;
}

这是我的公司模式,我只能指定一个邮件 ID。但我想将邮件发送到 2 个邮件 ID

App\Notifications\JobApplication.php

public function toMail($notifiable) {
    $message = 'A candidate applied for your job posting, ' . $this->job['job_title'];
    return (new MailMessage)
        ->line($message)
        ->line('Thank you for using our application!');
}

应聘者应聘公司职位时,应发送邮件至该公司的办公邮箱和公司的登录邮箱。即)我的公司表包含电子邮件字段和 office_mail 字段

我看到了这个链接“https://github.com/laravel/framework/issues/15694”。但不清楚如何使用htis。

【问题讨论】:

    标签: php email laravel-5.4


    【解决方案1】:
    public function routeNotificationForMail() {
        return [$this->office_mail, $this->email];
    }
    

    可以作为数组返回

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-30
      • 2020-06-26
      • 1970-01-01
      • 2021-03-28
      相关资源
      最近更新 更多