PHPackages                             aednzxy/email-auth - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. aednzxy/email-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

aednzxy/email-auth
==================

Discover IMAP/SMTP settings, authenticate via any email

v1.4(6y ago)059MITPHPPHP &gt;=7.1.0

Since Jul 8Pushed 6y agoCompare

[ Source](https://github.com/aednzxy/email-auth)[ Packagist](https://packagist.org/packages/aednzxy/email-auth)[ RSS](/packages/aednzxy-email-auth/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (3)DependenciesVersions (6)Used By (0)

EmailAuth
=========

[](#emailauth)

A library to authenticate via an arbitrary email or/and to discover IMAP/SMTP settings by email address. Can be for example used in the projects where one doesn't need to keep a user entity in the database, but for which at the same time an authentication with service providers like Google is not enough.

Installation
============

[](#installation)

- Install Composer:
- Run `php composer.phar require punarinta/email-auth:1.*`
- Assure "autoload.php" file from vendor directory is included

Sample usage
============

[](#sample-usage)

#### Authentication

[](#authentication)

```
use \EmailAuth\Auth;

$auth = new Auth;
if ($auth->login('your@email', 'your-password'))
{
  // You are authenticated.
}
elseif ($auth->status == Auth::STATUS_OAUTH_NEEDED)
{
  // Please authenticate via OAuth.
}
else
{
  // Thou shalt not pass!
}

```

#### Discovery

[](#discovery)

```
use \EmailAuth\Discover;
$discover = new Discover;

$config = $discover->imap('your@email');
echo "IMAP is on {$config['host']}:{$config['port']}, encryption is $config['encryption']}\n";

$config = $discover->smtp('your@email');
echo "SMTP is on {$config['host']}:{$config['port']}, encryption is $config['encryption']}\n";

```

Troubleshooting
===============

[](#troubleshooting)

##### Fatal error: Call to undefined function imap\_open()

[](#fatal-error-call-to-undefined-function-imap_open)

No IMAP module is installed for PHP. Here's an example for PHP7 and Ubuntu how to fix it.

```
sudo apt-get install php7.0-imap
sudo phpenmod imap

```

License
=======

[](#license)

This project is licensed under the terms of [**MIT**](https://github.com/punarinta/email-auth/blob/master/LICENSE) license.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 91.1% 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

Every ~348 days

Total

5

Last Release

2210d ago

PHP version history (2 changes)v1.0PHP &gt;=5.4.0

v1.2PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d44e5a24af5094431cdf946ef5c14b84b16497228539c99baab76fb56d144b6?d=identicon)[aednzxy](/maintainers/aednzxy)

---

Top Contributors

[![punarinta](https://avatars.githubusercontent.com/u/2189981?v=4)](https://github.com/punarinta "punarinta (41 commits)")[![aednzxy](https://avatars.githubusercontent.com/u/36283458?v=4)](https://github.com/aednzxy "aednzxy (4 commits)")

---

Tags

authAuthenticationemaildnsdiscoversmtpimap

### Embed Badge

![Health badge](/badges/aednzxy-email-auth/health.svg)

```
[![Health](https://phpackages.com/badges/aednzxy-email-auth/health.svg)](https://phpackages.com/packages/aednzxy-email-auth)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[lakm/nopass

Provides passwordless authentication for your laravel projects.

2213.6k2](/packages/lakm-nopass)

PHPackages © 2026

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