Code Monkey home page Code Monkey logo

codeception-email-imap's Introduction

Description

This repository offers a Codeception module for testing emails via imap with codeception.

MailHog

The module was inspired by https://packagist.org/packages/ericmartel/codeception-email-mailhog and has a compatible API, so a test can be configured for local run with MailHog and a run against an external server with imap.

Imap

This module connects to an imap server and loads the messages from the inbox. The module depends on the composer module ddeboer/imap to use an object oriented structure.

Important: the php module php-imap needs to be loaded in the cli environment! There are some issues with php from homebrew on OSX, php from https://php-osx.liip.ch/ should work fine as well as installing the module in Debian or Ubuntu.

Configuration

Like the MailHog module, it needs to be enabled for the targeted environment. If you have multiple recipients, think about collecting them all in ONE inbox, since the module can filter the messages by the targeted recipient.

modules:
    enabled:
        - ImapMail
    config:
        ImapMail:
          # required, all generated mails should end up in this mailbox
          imapUser: [email protected]
          # required
          imapPassword: bar
          # required
          imapServer: mail.example.org
          
          # optional, defaults to 143, set the proper port, e.g. 993 for TLS
          imapPort: 993
          # optional, pass flags to the imap connection, e.g. to disable validity check of the ssl cert
          imapFlags: /imap/ssl/novalidate-cert
          
          # optional, defaults to false, remove all mails from the inbox after the scenario run
          deleteEmailsAfterScenario: true

codeception-email-imap's People

Watchers

Stefan Regniet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.