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 1mo ago

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

Maturity23

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

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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