PHPackages                             samolabams/smtp-validator - 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. samolabams/smtp-validator

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

samolabams/smtp-validator
=========================

A simple laravel package that validates your smtp credentials without sending a test mail

1.0.0(8y ago)105731MITPHPPHP &gt;=5.5.9

Since Mar 3Pushed 8y ago2 watchersCompare

[ Source](https://github.com/samolabams/smtp-validator)[ Packagist](https://packagist.org/packages/samolabams/smtp-validator)[ Docs](https://github.com/samolabams/smtp-validator)[ RSS](/packages/samolabams-smtp-validator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Smtp Validator
======================

[](#laravel-smtp-validator)

This laravel package can be used to validate your smtp credentials without sending a test mail

Package Installation
====================

[](#package-installation)

Require this package in your composer.json file and update composer.

```
composer require samolabams/smtp-validator

```

- If you are on laravel 5.5 and above, thats all you need to do.
- If your laravel version is &lt; 5.5, you'll need to register a service provider and optionally add a facade. Open up config/app and the following to your `providers` array:

```
Samolabams\SmtpValidator\SmtpValidatorServceProvider::class,

```

Optionally, you can also use a facade for shorter code:

```
'SmtpValidator' => Samolabams\SmtpValidator\SmtpValidatorFacade::class,

```

Usage
=====

[](#usage)

Create a new validation with the "newValidation" method with your hostname and port(default port is 25) as parameters, optionally add a username and password, encryption type and "validate" VOILA!!!.

Use the App container

```
$smtpValidator = App::make('smtp-validator');
$smtpValidator->newValidation($host, $port);
$smtpValidator->validate();

```

Or use the facade

```
SmtpValidator::newValidation($host, $port)->validate();

If you have a smtp username/password and encryption, you can chain them to the validation calls

SmtpValidator::newValidation($host, $port)->setUsername($username)->setPassword($password)->setEncryption($encryption)->validate();

```

Response

```
The validate method returns a response object, with a success property (true/false value) and an optional message property which tells you the reason why your smtp credentials is invalid.

$response = SmtpValidator::newValidation($host, $port)->validate();
if ($response->success === true) {
  // GOOD TO GO!!!
} else {
  // SOMETHING WENT WRONG!!!
  $message = $response->message;
}

```

Contributing
============

[](#contributing)

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

License
=======

[](#license)

This Smtp Validator is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

2991d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fecf8b068a3273e062d0b5446b5e325b174919ee44a99f169aed93037a79ba2?d=identicon)[samolabams](/maintainers/samolabams)

---

Top Contributors

[![samolabams](https://avatars.githubusercontent.com/u/5626432?v=4)](https://github.com/samolabams "samolabams (3 commits)")

---

Tags

laravelvalidatorvalidationvalidatesmtpsamolabamslaravel-smtp

### Embed Badge

![Health badge](/badges/samolabams-smtp-validator/health.svg)

```
[![Health](https://phpackages.com/badges/samolabams-smtp-validator/health.svg)](https://phpackages.com/packages/samolabams-smtp-validator)
```

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[sadegh19b/laravel-persian-validation

A comprehensive Laravel validation package for Persian text, numbers, dates, and Iranian national identifiers

18293.8k1](/packages/sadegh19b-laravel-persian-validation)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

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