I am trying to send auto reply to the newly registered user and I want to send them an image rather than the text but when I try to send the image the mail does sent but image receive is broken. Studied many answers from stackoverflow as well tried many other solutions from the internet but nothing seems to be working. here is my mail class.
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class autoMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject("RCCI (Pakistan's 1st Virtual Online Expo)")
->view('emails.autoemail');
}
}
And here is my function which is calling this mail class.
Mail::to($request->email)->send(new autoMail());
And last but not the least my view which I am sending as a mail.
<!DOCTYPE html>
<html>
<head>
<title>Auto Email</title>
</head>
<body>
<img src="">
</body>
</html>
Any help would be appreciated as I am stuck here for so much time. Thank you in advance
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3gaBOHc
via IFTTT
Aucun commentaire:
Enregistrer un commentaire