{"id":21893729,"url":"https://github.com/micc83/mailamie","last_synced_at":"2025-04-15T15:32:15.574Z","repository":{"id":42703551,"uuid":"287828121","full_name":"micc83/mailamie","owner":"micc83","description":"🌈 Mailamie is a simple SMTP catch all server for testing  written in PHP.","archived":false,"fork":false,"pushed_at":"2023-03-14T21:55:53.000Z","size":1563,"stargazers_count":78,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T19:07:22.527Z","etag":null,"topics":["php","smtp-server","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micc83.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-15T21:33:42.000Z","updated_at":"2024-09-24T07:53:15.000Z","dependencies_parsed_at":"2023-02-08T04:02:13.547Z","dependency_job_id":null,"html_url":"https://github.com/micc83/mailamie","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2Fmailamie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2Fmailamie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2Fmailamie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2Fmailamie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micc83","download_url":"https://codeload.github.com/micc83/mailamie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249098172,"owners_count":21212437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","smtp-server","testing"],"created_at":"2024-11-28T13:16:25.141Z","updated_at":"2025-04-15T15:32:15.555Z","avatar_url":"https://github.com/micc83.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)\n\n# Mailamie\n**Catch All SMTP Server for testing**\n\n![Tests](https://github.com/micc83/mailamie/workflows/Tests/badge.svg?branch=main) \n![PHP CS Fixer](https://github.com/micc83/mailamie/workflows/PHP%20CS%20Fixer/badge.svg?branch=main)\n![PHPStan](https://github.com/micc83/mailamie/workflows/PHPStan/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/micc83/mailamie/branch/main/graph/badge.svg?token=DSftrwIbb1)](https://codecov.io/gh/micc83/mailamie)\n\n## Index\n\n- [Why](#why)\n- [About](#how)\n- [Install](#install)\n- [Usage](#usage)\n- [Settings](#settings)\n- [Changelog](changelog.md)\n- [License](license.md)\n\n## Why\n\nSometime you just need a simple tool to verify that some legacy project, without tests in place or with some \nvery complex environment, sends the right emails to the right people. Surely there're many valid tools out there for the \njob but as it's not something happening every day it's pretty cumbersome having to install these tools.\n\n**Mailamie** is a side project I've put up in my summer vacations for playing with async PHP. Using it is as simple \nas setting a few parameters on your project:\n```dotenv\n# Ex. Laravel .env file\nMAIL_MAILER=smtp\nMAIL_HOST=127.0.0.1\nMAIL_PORT=8025\nMAIL_ENCRYPTION=null\n```\nand running it with the command:\n```shell script\n$ mailamie\n```\n\n## How\n\n**Mailamie** is a pretty simple Catch All SMTP Server for local testing completely written in PHP and based on the great \nwork made by the folks at [ReactPhp](https://reactphp.org/). \n\nIt's in no way a replacement for more complete tools such as [Mailhog](https://github.com/mailhog/MailHog) as it doesn't \nactually check SMTP implementantion details, instead it only cares about getting emails headers and body for high level\ndelivery testing.\n\n**DO NOT USE IN PRODUCTION**. Mailamie starts three different servers (SMTP on port 8025, HTTP on port 8080, WebSocket \non port 1338). No steps have been taken to secure any of the three. Also, external access to those ports should be \nblocked.\n\n**Mailamie** can be used directly from the CLI:\n\n![](docs/cli.png)\n\nor, for better UX, in the browser:\n\n![](docs/browser.png)\n\n## Install\n\n**Mailamie** requires PHP ^7.4. To install it globally on your system run the following command to install:\n\n```shell script\ncomposer global require micc83/mailamie\n```\n\n## Usage\n\nRun the following command to get help:\n\n```shell script\nmailamie --help\n```\n\nThe output will be:\n\n```shell script\nDescription:\n  Mailamie is catch all SMTP server for testing.\n\nUsage:\n  mailamie [options]\n  mailamie --host=127.0.0.1 --port=25    Ex. SMTP Host definition\n\nOptions:\n  -H, --host=HOST       Set the host on which to listen for calls\n  -p, --port=PORT       Set the port on which to listen for SMTP calls\n  -h, --help            Display this help message\n  -q, --quiet           Do not output any message\n  -V, --version         Display this application version\n      --ansi            Force ANSI output\n      --no-ansi         Disable ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  You can define custom configuration from the file ~/.mailamie.config.php,\n  check the project readme file at https://github.com/micc83/mailamie\n  for all the available settings.\n```\n\n## Settings\n\nYou can define default settings in `~/.mailamie.config.php`, in order to do so run:\n\n```shell script\n$ touch ~/.mailamie.config.php \u0026\u0026 vim ~/.mailamie.config.php\n```\n\nThis files returns a PHP array with the following available settings. \n\n```php\n\u003c?php\n\nreturn [\n    'smtp' =\u003e [\n        'host' =\u003e '127.0.0.1',\n        'port' =\u003e '8025'\n    ],\n\n    'http' =\u003e [\n        'host' =\u003e '127.0.0.1',\n        'port' =\u003e '8080'\n    ],\n\n    'websocket' =\u003e [\n        'host' =\u003e '127.0.0.1',\n        'port' =\u003e '1338'\n    ],\n];\n```\n\nYou'd better define only the needed ones, in case something should change after upgrades.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicc83%2Fmailamie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicc83%2Fmailamie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicc83%2Fmailamie/lists"}