PHPackages                             yego87/codeception-smtp-mail - 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. yego87/codeception-smtp-mail

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

yego87/codeception-smtp-mail
============================

Test emails in your Codeception acceptance tests

v0.8.2(8y ago)04MITPHP

Since Sep 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yego87/codeception-smtp-mail)[ Packagist](https://packagist.org/packages/yego87/codeception-smtp-mail)[ Docs](https://github.com/AhmedSamy/codeception-smtp-mail)[ RSS](/packages/yego87-codeception-smtp-mail/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (12)Used By (0)

### Installation

[](#installation)

```
$ composer require ahmedsamy/codeception-smtp-mail
```

### Configuration

[](#configuration)

in `acceptance.yml`

```
modules:
    enabled:
        - Smtp:
            username: name@email.com
            password: password
```

Build codeception

```
$ bin/codecept build
```

### Available methods

[](#available-methods)

- `seeEmail($criteria)`
- `canSeeEmail($criteria)`
- `seeEmail($criteria)`
- `cantSeeEmail($criteria)`
- `dontSeeEmail($criteria)`
- `openEmail($criteria)`
- `grabEmail()`
- `grabLinkFromEmail($url)`
- `clickInEmail($url)`
- `canSeeLinkInEmail($url)`
- `seeLinkInEmail($url)`
- `cantSeeLinkInEmail($url)`
- `dontSeeLinkInEmail($url)`
- `canSeeEmailAttachmentsCount($count)`
- `canSeeEmailAttachment($name)`
- `countEmailsByCriteria($criteria)`

- $criteria is according to imap syntax, see

### Examples

[](#examples)

Checking email with subject and date

```
$I->seeEmailBy('SUBJECT "HOWTO be Awesome" SINCE "8 August 2008"');

$I->canSeeEmail('SUBJECT "Welcome Email"');

$I->openEmail('SUBJECT "Open me"');

$I->canSeeEmail('SUBJECT "good words"');

$I->seeLinkInEmail('http://google.com/awesome');

$I->clickInEmail("http://google.com/awesome");

$I->grabLinkFromEmail("http://google.com/awesome");

$I->canSeeEmailAttachmentsCount(2);

$I->canSeeEmailAttachment('contract.pdf'); //accepts full file name or part of it
```

### Configuration reference

[](#configuration-reference)

```
Smtp:
    username: username@domain.com #required
    password: password123 #required
    imap_path: {imap.gmail.com:993/imap/ssl}INBOX  #imap path defaults to gmail config
    wait_interval: 1 #waiting interval between trials in seconds
    retry_counts: 3 # how many trials till
    attachments_dir: tests/_data #where email attachments are stored
    auto_clear_attachments: true #whether to clear attachments folder every run or not
```

\###TODOs

- Write tests
- Add travis.yml

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 68.2% 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 ~77 days

Recently: every ~164 days

Total

11

Last Release

3129d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b788709b3512494b3a4696ce0458c2cd22307a43ec1d5fa1c51666e2dec8804e?d=identicon)[Yegor Veselov](/maintainers/Yegor%20Veselov)

---

Top Contributors

[![AhmedSamy](https://avatars.githubusercontent.com/u/2566979?v=4)](https://github.com/AhmedSamy "AhmedSamy (30 commits)")[![vbayul](https://avatars.githubusercontent.com/u/6742256?v=4)](https://github.com/vbayul "vbayul (7 commits)")[![yego87](https://avatars.githubusercontent.com/u/17155949?v=4)](https://github.com/yego87 "yego87 (4 commits)")[![succinct](https://avatars.githubusercontent.com/u/1652658?v=4)](https://github.com/succinct "succinct (2 commits)")[![RIvanov-modus](https://avatars.githubusercontent.com/u/23175408?v=4)](https://github.com/RIvanov-modus "RIvanov-modus (1 commits)")

---

Tags

phpcodeceptionsmtpgmailPHP Unit

### Embed Badge

![Health badge](/badges/yego87-codeception-smtp-mail/health.svg)

```
[![Health](https://phpackages.com/badges/yego87-codeception-smtp-mail/health.svg)](https://phpackages.com/packages/yego87-codeception-smtp-mail)
```

###  Alternatives

[ahmedsamy/codeception-smtp-mail

Test emails in your Codeception acceptance tests

11172.7k1](/packages/ahmedsamy-codeception-smtp-mail)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.5k146.0k](/packages/jason-munro-cypht)[shuchkin/react-smtp-client

ReactPHP async SMTP Client

245.7k](/packages/shuchkin-react-smtp-client)[swissup/module-email

Magento2 email providers integration (smtp, mandrill, amazon ses)

1412.8k1](/packages/swissup-module-email)[tomatophp/filament-accounts

Manage your multi accounts inside your app using 1 table with multi auth and a lot of integrations

748.3k7](/packages/tomatophp-filament-accounts)

PHPackages © 2026

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