What is the use of Laravel - Sending Email ?

Answer Posted / surbhi

Laravel uses free feature-rich library SwiftMailer to send emails.
Using the library function, we can easily send emails without too many hassles.
The e-mail templates are loaded in the same way as views, which means you can use the Blade syntax and inject data into your templates.

Syntax : void send(string|array $view, array $data, Closure|string $callback)


The default type is HTML. If you want to send plain text mail then use the following syntax.

Syntax : Mail::send([‘text’=>’text.view’], $data, $callback);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a service supplier?

404


What is bagisto?

424


How to generate urls from named named routes?

415


What are the requirements for laravel 5.8?

420


What is database seeding in laravel?

383






Explain about laravel project?

403


How to redirect form controller to view file in laravel?

397


List types of the relationships supported by laravel?

384


What are the 3 service provider types?

429


What do you understand by eloquent orm?

413


What are bundles, reverse routing and the ioc container?

372


Explain the difference between laravel and codeigniter?

416


How to list all routes in laravel?

425


What is eloquent?

445


How to create Facade in Laravel ?

992