PHPackages                             areeb-malik/email-boiler-plate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. areeb-malik/email-boiler-plate

ActivePackage[Mail &amp; Notifications](/categories/mail)

areeb-malik/email-boiler-plate
==============================

A basic template for emailing.

00PHP

Since Jan 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/CC-Areeb/mailing)[ Packagist](https://packagist.org/packages/areeb-malik/email-boiler-plate)[ RSS](/packages/areeb-malik-email-boiler-plate/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Emailing template
=================

[](#emailing-template)

**Composer command**

```
composer require areeb-malik/email-boiler-plate

```

**Publishing the configurations**

```
php artisan vendor:publish --tag=CC-Emails

```

**Installation command**

```
php artisan install:email

```

---

Environment Variables
---------------------

[](#environment-variables)

To run this project, you will need to add the following environment variables to your .env file

`MAIL_MAILER`

`MAIL_HOST`

`MAIL_PORT`

`MAIL_USERNAME`

`MAIL_PASSWORD`

`MAIL_ENCRYPTION`

### After setting the environment variables, you can start your local development server and start sending mail by just clicking on the send button.

[](#after-setting-the-environment-variables-you-can-start-your-local-development-server-and-start-sending-mail-by-just-clicking-on-the-send-button)

Code snippets
-------------

[](#code-snippets)

#### Sending an attachment

[](#sending-an-attachment)

```
public function build()
{
    $this->from($this->validator['sender'])
        ->subject($this->validator['subject'])
        ->to($this->validator['to'])
        ->attach(base_path('README.md'))
        ->markdown('emails.welcome');
    return $this;
}

```

#### Sending multiple attachments

[](#sending-multiple-attachments)

```
public function sendEmail()
{
    $attachments = [
        ,
        ,
        ,
    ];

    $validator = [
        'sender' => '',
        'to' => '',
        'subject' => '',
        'message' => '',
        'attachments' => $attachments
    ];
    Mail::queue((new Emails($validator))->onQueue('emails'));
    return "mail has been sent";
}

```

#### In the emails file

[](#in-the-emails-file)

```
class Emails extends Mailable implements ShouldQueue
{
    use Queueable, SerializesModels;

    public $validator;

    /**
     * Create a new message instance.
     *
     * @return void
     */

    public function __construct($validator)
    {
        $this->validator = $validator;
    }

    /**
     * Build the message.
     *
     * @return $this
     */

    public function build()
    {
        $this->from($this->validator['sender'])
            ->subject($this->validator['subject'])
            ->to($this->validator['to'])
            ->markdown('emails.welcome');
            foreach ($this->validator['attachments'] as $attachment) {
                $this->attach($attachment);
            }
        return $this;
    }

```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8d36c6edd10184bb8b0eafdbf186b64980fe2373ad110728bcfbc0eeb560bfa?d=identicon)[Muhammad Areeb Malik](/maintainers/Muhammad%20Areeb%20Malik)

---

Top Contributors

[![CC-Areeb](https://avatars.githubusercontent.com/u/96907614?v=4)](https://github.com/CC-Areeb "CC-Areeb (22 commits)")

### Embed Badge

![Health badge](/badges/areeb-malik-email-boiler-plate/health.svg)

```
[![Health](https://phpackages.com/badges/areeb-malik-email-boiler-plate/health.svg)](https://phpackages.com/packages/areeb-malik-email-boiler-plate)
```

###  Alternatives

[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
