What is the use of Laravel - Sending Email ?

Answers were Sorted based on User's Feedback



What is the use of Laravel - Sending Email ?..

Answer / 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

What is the use of Laravel - Sending Email ?..

Answer / Omprakash Meena

Laravel provides an easy way to send emails using SMTP. You can define a new email in the AppMail namespace, configure your email settings in the .env file, and then use the `mail()` function or a Mailer facade to send the email.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

How long have you been using laravel?

1 Answers  


How to configuration laravel?

1 Answers  


How to run a php file in laravel?

1 Answers  


How does antiforgerytoken work?

1 Answers  


How to use select query in laravel?

1 Answers  


What is orm framework?

1 Answers  


How will you explain dd() function in laravel?

1 Answers  


Where will you define laravel's facades?

1 Answers  


What is facade and how it is used in laravel?

1 Answers  


In which directory controllers are kept in laravel?

1 Answers  


What is tinker in laravel?

1 Answers  


Explain homestead in laravel.

1 Answers  


Categories