Pros:
Fetch or custom IMAP/POP implementations). This aligns well with Laravel’s need for reliable, deterministic testing of email-related functionality (e.g., mailers, notifications, or third-party integrations).Cons:
testuser/applesauce) and port mappings may conflict with existing Laravel test environments (e.g., Mailgun, Mailpit, or Laravel’s built-in MailFake).Mailable classes).mailhog/mailhog).MailFake or Mailpit for IMAP/POP-specific tests (e.g., verifying emails are sent/received correctly).config/mail.php expects SMTP; this package provides IMAP/POP, requiring test-specific mail client logic (e.g., imap_connect in PHPUnit).dovecot-core vs. modern Laravel’s PHP 8.x).SwiftMailer or Symfony Mailer for IMAP tests.dovecot:latest) for better isolation and faster spins.SetupEnvironment.sh to:
phpunit.xml (e.g., auto-setup before tests).Mailpit or MailHog for SMTP tests; reserve this package for IMAP/POP-specific scenarios.MailFake), the value of this package is limited. Assess whether IMAP/POP workflows (e.g., fetching sent emails) are a priority.Mailable assertions).MailFake for hybrid SMTP/IMAP testing.imap_connect in tests) vs. Laravel’s Mail::fake().SetupEnvironment.sh as a @beforeClass or beforeAll hook.docker-compose.yml for Dovecot (example below):
version: '3'
services:
dovecot:
image: dovecot/dovecot:latest
ports:
- "143:143"
- "993:993"
volumes:
- ./dovecot-conf:/etc/dovecot
- ./mail-storage:/var/mail
jobs:
test:
services:
dovecot:
image: dovecot/dovecot
ports:
- 143:143
steps:
- run: composer install
- run: ./vendor/tedivm/dovecottesting/SetupEnvironment.sh
- run: phpunit
composer.json as a dev dependency.phpunit.xml bootstrap:
<php>
<server name="IMAP_HOST" value="127.0.0.1"/>
<server name="IMAP_PORT" value="143"/>
</php>
laravel-dovecot-testing).dovecot-core (v2.0.x). Modern Laravel apps may need Dovecot 2.3+ for:
openssl extensions.How can I help you explore Laravel packages today?