Posted inLaravel / Mysql / php

laravel attachment – Laravel Send Email with Multiple Attachment Example

laravel attachment with Send Email with Multiple Attachment is always cumbersome work in web application. Laravel provides a very simple api to send mail to users.

laravel attachment

Laravel latest version of the file attachment helpers. Today in this article We are going to show you how to send mail with laravel attachment.

Step 1: Install Laravel

composer create-project --prefer-dist laravel/laravel sendEmailExample

Step 2: Make Configuration


[email protected]
[email protected]

Don’t miss : Unique Collection – Laravel Collection Get Unique Values Example

Step 3: Create Mail

In this phase i will make mail class SendDemoEmailExample for email sending.

php artisan make:mail SendDemoEmailExample


information_data = $information_data;
     * Build the message.
     * created by
     * @return $this
    public function build()
        $this->subject('Mail from')
        foreach ($this->information_data['files'] as $file){
        return $this;

Step 4: Create Blade View



{{ $information_data['title'] }}

{{ $information_data['body'] }}

Thank you

Step 5: Add Route


Step 6: Add Controller


 'Mail from 2',
            'body' => 'Demo Example: This pakainfo is for testing email using smtp',
            'files' => $files
        Mail::to('[email protected]')->send(new SendDemoEmailExample($information_data));
        dd("Email is Sent.");

I hope you get an idea about laravel attachment.
I would like to have feedback on my
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype