to start I would like to apologize for my English.
I have a problem with sending email with Laravel. as you can see in the image that I attached, there is html code.
According to the research I did this could come from my email template file. So I reinstalled the “vendors” folder but that didn’t change anything. I am running version 11 of Laravel. thank you in advance for your help. here is the code for my page:
<?php
namespace AppNotifications;
use IlluminateBusQueueable;
use IlluminateContractsQueueShouldQueue;
use IlluminateNotificationsMessagesMailMessage;
use IlluminateNotificationsNotification;
class ResetPasswordNotification extends Notification
{
use Queueable;
protected $token;
/**
* Create a new notification instance.
*/
public function __construct($token)
{
$this->token = $token;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('Password Reset Request')
->line('You are receiving this email because we have received a request to reset the password for your account. If you did not request a password reset, please disregard this email. No further action is required on your part.')
->line('To reset your password, please click on the link below:')
->action('Reset password', url("/reset/{$this->token}"))
->line('This link will expire in 60 minutes. If you need further assistance, please contact our support team.');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
return [
//
];
}
}
New contributor
Ibrahim Toulouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4