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

Please write some additional where clauses in laravel?

522


How to make a helper file in laravel?

525


What is a Middleware Parameters ?

686


What are the applications supported by valet?

496


What do you know about csrf token in laravel?

562


What is a service supplier?

519


Explain how to get requested path in laravel?

534


What are the major differences between laravel 4 and laravel 5.x?

509


Explain the concept of events in laravel.

581


What is view laravel?

538


How will you explain homestead in laravel?

531


How to change your default database type in laravel?

547


Does laravel support caching?

507


Difference between facades vs. Dependency injection?

579


What are route parameters?

553