diff --git a/app/Notifications/AuditEmailNotify.php b/app/Notifications/AuditEmailNotify.php index e02df1a..ddf1f60 100644 --- a/app/Notifications/AuditEmailNotify.php +++ b/app/Notifications/AuditEmailNotify.php @@ -50,7 +50,7 @@ class AuditEmailNotify extends Notification if ($this->isFirstAudit) { // 第一个审核人的邮件 return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject('新的拜访审核通知 - ' . $visitData['name']) ->greeting('您好 ' . $notifiable->name . ',') ->line('您有一个新的拜访申请需要审核,访客 ' . $visitData['name'] . ' 预约于 ' . $visitData['date'] . ' 到访。') @@ -62,7 +62,7 @@ class AuditEmailNotify extends Notification } else { // 后续审核人的邮件 return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject('拜访审核流转通知 - ' . $visitData['name']) ->greeting('您好 ' . $notifiable->name . ',') ->line('拜访申请 ' . $visitData['name'] . ' 预约于 ' . $visitData['date'] . ' 的审核已流转到您这里,上一级审核人:' . ($visitData['previous_admin'] ?? '') . '。') diff --git a/app/Notifications/AuditResultEmailNotify.php b/app/Notifications/AuditResultEmailNotify.php index 0d02dd7..58c1c37 100644 --- a/app/Notifications/AuditResultEmailNotify.php +++ b/app/Notifications/AuditResultEmailNotify.php @@ -51,7 +51,7 @@ class AuditResultEmailNotify extends Notification if ($auditResult === '通过') { // 审核通过的邮件 return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject('拜访申请审核通过通知 - ' . $visitData['name']) ->greeting('您好 ' . $visitData['visitor_name'] . ',') ->line('您的拜访申请已审核通过,预约于 ' . $visitData['date'] . ' 到访。') @@ -63,7 +63,7 @@ class AuditResultEmailNotify extends Notification } else { // 审核驳回的邮件 return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject('拜访申请审核驳回通知 - ' . $visitData['name']) ->greeting('您好 ' . $visitData['visitor_name'] . ',') ->line('很抱歉,您的拜访申请未通过审核。') diff --git a/app/Notifications/CancelEmailNotify.php b/app/Notifications/CancelEmailNotify.php index 7338b46..093453a 100644 --- a/app/Notifications/CancelEmailNotify.php +++ b/app/Notifications/CancelEmailNotify.php @@ -45,7 +45,7 @@ class CancelEmailNotify extends Notification $visitData = $this->visitData; return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject('拜访预约取消通知 - ' . $visitData['name']) ->greeting('您好 ' . $notifiable->name . ',') ->line('访客 ' . $visitData['name'] . ' 原预约于 ' . $visitData['date'] . ' 的拜访已取消。') diff --git a/app/Notifications/EmailNotify.php b/app/Notifications/EmailNotify.php index 5208b1a..bc83361 100644 --- a/app/Notifications/EmailNotify.php +++ b/app/Notifications/EmailNotify.php @@ -44,7 +44,7 @@ class EmailNotify extends Notification public function toMail($notifiable) { return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject($notifiable->title) ->line($notifiable->content) ->line('') diff --git a/app/Notifications/VisitEmailNotify.php b/app/Notifications/VisitEmailNotify.php index 02ecbc6..35b8ea8 100644 --- a/app/Notifications/VisitEmailNotify.php +++ b/app/Notifications/VisitEmailNotify.php @@ -45,7 +45,7 @@ class VisitEmailNotify extends Notification $visitData = $this->visitData; return (new MailMessage) - ->from('no-reply@tinge.com', 'tinge Suzhou HR') + ->from(config('mail.from.address'), 'tinge Suzhou HR') ->subject('新的拜访预约通知 - ' . $visitData['name']) ->greeting('您好 ' . $notifiable->name . ',') ->line('您有一个新的拜访预约,访客 ' . $visitData['name'] . ' 预约于 ' . $visitData['date'] . ' 到访。')