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)14MITPHPPHP &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 1mo ago

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 32% of packages

Maintenance41

Moderate activity, may be stable

Popularity5

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

487d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcc2aa61df40618fd361f2ff752a6f922e99f513b7290d4d0f8b2766c3b265b6?d=identicon)[qaxim](/maintainers/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

[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)[eduardokum/laravel-mail-auto-embed

Library for embed images in emails automatically

1702.0M5](/packages/eduardokum-laravel-mail-auto-embed)

PHPackages © 2026

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