PHPackages                             codeqasim/mailer - 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. codeqasim/mailer

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

codeqasim/mailer
================

A professional PHP email library.

1.0(1y ago)16MITPHPPHP &gt;=7.4

Since Jan 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/codeqasim/Mailer)[ Packagist](https://packagist.org/packages/codeqasim/mailer)[ RSS](/packages/codeqasim-mailer/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

CodeQasim Mailer
================

[](#codeqasim-mailer)

**CodeQasim Mailer** is a lightweight, professional PHP library for sending emails via SMTP. It supports templated emails with variable placeholders, attachments, and secure authentication (TLS/SSL). Built for simplicity and flexibility, this library is perfect for developers who need an efficient and customizable mailer solution.

---

Features
--------

[](#features)

- **SMTP Support**: Send emails using secure SMTP configurations.
- **Templated Emails**: Use `.html` templates with placeholders (e.g., `{name}`, `{date}`).
- **Secure Authentication**: Supports TLS and SSL encryption.
- **PSR-4 Autoloading**: Easy integration with Composer.
- **Customizable**: Flexible email headers, body, and configurations.

---

Installation
------------

[](#installation)

Install the library using Composer:

```
composer require codeqasim/mailer
```

---

Usage
-----

[](#usage)

### Configuration

[](#configuration)

Set up the mailer with your SMTP server details:

```
require 'vendor/autoload.php';

use CodeQasim\Mailer\Mailer;

$mailer = new Mailer();

$mailer->configure([
    'server' => 'smtp.gmail.com',
    'port' => 587,
    'security' => 'tls', // 'tls' or 'ssl'
    'username' => 'your_email@gmail.com',
    'password' => 'your_email_password',
]);
```

### Sending an Email

[](#sending-an-email)

Send an email using an HTML template and variable placeholders:

```
$mailer->sendEmail([
    'from' => 'your_email@gmail.com',
    'to' => 'recipient@example.com',
    'subject' => 'Test Email',
    'template' => 'path/to/template.html', // Path to your template
    'variables' => [ // Variables for placeholders in the template
        'name' => 'John Doe',
        'date' => date('Y-m-d'),
    ],
]);
```

### Example HTML Template

[](#example-html-template)

Create a `.html` file for your email template:

```
>

    {subject}

    Dear {name},
    This is a test email sent on {date}.

```

---

License
-------

[](#license)

This library is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

---

Contributing
------------

[](#contributing)

Contributions are welcome! Please open an issue or submit a pull request to contribute.

---

Support
-------

[](#support)

For support or questions, feel free to contact us at [compoxition@gmail](mailto:compoxition@gmail.com).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

532d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/106806363?v=4)[qaxim](/maintainers/qaxim)[@qaxim](https://github.com/qaxim)

---

Top Contributors

[![codeqasim](https://avatars.githubusercontent.com/u/44278286?v=4)](https://github.com/codeqasim "codeqasim (5 commits)")

### Embed Badge

![Health badge](/badges/codeqasim-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/codeqasim-mailer/health.svg)](https://phpackages.com/packages/codeqasim-mailer)
```

###  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)
