我使用的是默认电子邮件模板,在某些情况下,电子邮件会变得乱七八糟。
有关该问题的其他信息:
问题是,我该怎么做才能解决此问题,并确保它不会再次发生。 SMTP设置是否发生更改等?
根据代码:
<?php
namespace Framework\Notifications\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class AuthenticationLink extends Notification// implements ShouldQueue
{
use Queueable;
protected $name;
protected $link;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($name, $link)
{
$this->name = $name;
$this->link = $link;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->subject(__('mail/authentication.System Authentication'))
->greeting(__('mail/default.Hello').' '.$this->name)
->line(__('mail/authentication.Please click the link below to confirm your email and begin using System'))
->action(__('default.Confirm'), $this->link);
}
我一直在通过Google搜索,并在Laravel Discord和Laravel FB Group中寻求帮助。现在还是一无所有。
任何帮助都可以。非常感谢。