{"id":13469410,"url":"https://github.com/maildev/maildev","last_synced_at":"2025-05-12T03:40:21.415Z","repository":{"id":37734530,"uuid":"9135204","full_name":"maildev/maildev","owner":"maildev","description":":mailbox: SMTP Server + Web Interface for viewing and testing emails during development.","archived":false,"fork":false,"pushed_at":"2024-12-12T02:16:05.000Z","size":18798,"stargazers_count":5450,"open_issues_count":123,"forks_count":521,"subscribers_count":55,"default_branch":"main","last_synced_at":"2025-05-09T13:47:41.550Z","etag":null,"topics":["developer-tools","development","docker","mailcatcher","maildev","nodejs","nodemailer","smtp","smtp-server","testing"],"latest_commit_sha":null,"homepage":"https://maildev.github.io/maildev/","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maildev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-03-31T19:37:09.000Z","updated_at":"2025-05-08T07:21:59.000Z","dependencies_parsed_at":"2024-11-25T10:04:26.587Z","dependency_job_id":"9fee3ea6-6caf-47d9-a786-c30b9863aade","html_url":"https://github.com/maildev/maildev","commit_stats":{"total_commits":601,"total_committers":77,"mean_commits":7.805194805194805,"dds":0.5341098169717138,"last_synced_commit":"2385ecd4af1aa805c5e3f9d16f340abab8798675"},"previous_names":["djfarrelly/maildev"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maildev%2Fmaildev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maildev%2Fmaildev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maildev%2Fmaildev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maildev%2Fmaildev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maildev","download_url":"https://codeload.github.com/maildev/maildev/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253428494,"owners_count":21906928,"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":["developer-tools","development","docker","mailcatcher","maildev","nodejs","nodemailer","smtp","smtp-server","testing"],"created_at":"2024-07-31T15:01:38.410Z","updated_at":"2025-05-12T03:40:21.382Z","avatar_url":"https://github.com/maildev.png","language":"SCSS","readme":"# MailDev\n\n[![npm](https://img.shields.io/npm/v/maildev)](https://www.npmjs.com/package/maildev)\n[![npm downloads](https://img.shields.io/npm/dm/maildev)](https://www.npmjs.com/package/maildev)\n[![Docker Pulls](https://img.shields.io/docker/pulls/maildev/maildev)](https://hub.docker.com/r/maildev/maildev)\n[![License](https://img.shields.io/npm/l/maildev?color=white)](/LICENSE)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-black.svg)](https://standardjs.com)\n\n\n\u003e MailDev is sponsored by ⭐️ **[inngest/inngest](https://github.com/inngest/inngest)**.\n\u003e\n\u003e [**Inngest** is the developer platform](https://www.inngest.com/?ref=maildev) for easily building reliable workflows with zero infrastructure. Check it out and give it a star! ⭐️\n\n**MailDev** is a simple way to test your project's generated email during development, with an easy to use web interface that runs on your machine built on top of [Node.js](http://www.nodejs.org).\n\n![MailDev Screenshot](https://github.com/maildev/maildev/blob/gh-pages/images/screenshot-2021-01-03.png?raw=true)\n\n## Docker Run\n\nIf you want to use MailDev with [Docker](https://www.docker.com/), you can use the\n[**maildev/maildev** image on Docker Hub](https://hub.docker.com/r/maildev/maildev).\nFor a guide for usage with Docker,\n[checkout the docs](https://github.com/maildev/maildev/blob/master/docs/docker.md).\n\n    $ docker run -p 1080:1080 -p 1025:1025 maildev/maildev\n\n## Usage\n\n```\nUsage: maildev [options]\n```\n\n| Options                          | Environment variable       | Description                                                                               |\n| -------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- |\n| `-s, --smtp \u003cport\u003e`              | `MAILDEV_SMTP_PORT`        | SMTP port to catch mail                                                                   |\n| `-w, --web \u003cport\u003e`               | `MAILDEV_WEB_PORT`         | Port to run the Web GUI                                                                   |\n| `--mail-directory \u003cpath\u003e`        | `MAILDEV_MAIL_DIRECTORY`   | Directory for persisting mail                                                             |\n| `--https`                        | `MAILDEV_HTTPS`            | Switch from http to https protocol                                                        |\n| `--https-key \u003cfile\u003e`             | `MAILDEV_HTTPS_KEY`        | The file path to the ssl private key                                                      |\n| `--https-cert \u003cfile\u003e`            | `MAILDEV_HTTPS_CERT`       | The file path to the ssl cert file                                                        |\n| `--ip \u003cip address\u003e`              | `MAILDEV_IP`               | IP Address to bind SMTP service to, defaults to `::` (any IPv4/v6)                        |\n| `--outgoing-host \u003chost\u003e`         | `MAILDEV_OUTGOING_HOST`    | SMTP host for outgoing mail                                                               |\n| `--outgoing-port \u003cport\u003e`         | `MAILDEV_OUTGOING_PORT`    | SMTP port for outgoing mail                                                               |\n| `--outgoing-user \u003cuser\u003e`         | `MAILDEV_OUTGOING_USER`    | SMTP user for outgoing mail                                                               |\n| `--outgoing-pass \u003cpassword\u003e`     | `MAILDEV_OUTGOING_PASS`    | SMTP password for outgoing mail                                                           |\n| `--outgoing-secure`              | `MAILDEV_OUTGOING_SECURE`  | Use SMTP SSL for outgoing mail                                                            |\n| `--auto-relay [email]`           | `MAILDEV_AUTO_RELAY`       | Use auto-relay mode. Optional relay email address                                         |\n| `--auto-relay-rules \u003cfile\u003e`      | `MAILDEV_AUTO_RELAY_RULES` | Filter rules for auto relay mode                                                          |\n| `--incoming-user \u003cuser\u003e`         | `MAILDEV_INCOMING_USER`    | SMTP user for incoming mail                                                               |\n| `--incoming-pass \u003cpass\u003e`         | `MAILDEV_INCOMING_PASS`    | SMTP password for incoming mail                                                           |\n| `--incoming-secure`              | `MAILDEV_INCOMING_SECURE`  | Use SMTP SSL for incoming emails                                                          |\n| `--incoming-cert \u003cpath\u003e`         | `MAILDEV_INCOMING_CERT`    | Cert file location for incoming SSL                                                       |\n| `--incoming-key \u003cpath\u003e`          | `MAILDEV_INCOMING_KEY`     | Key file location for incoming SSL                                                        |\n| `--web-ip \u003cip address\u003e`          | `MAILDEV_WEB_IP`           | IP Address to bind HTTP service to, defaults to --ip                                      |\n| `--web-user \u003cuser\u003e`              | `MAILDEV_WEB_USER`         | HTTP user for GUI                                                                         |\n| `--web-pass \u003cpassword\u003e`          | `MAILDEV_WEB_PASS`         | HTTP password for GUI                                                                     |\n| `--base-pathname \u003cpath\u003e`         | `MAILDEV_BASE_PATHNAME`    | Base path for URLs                                                                        |\n| `--disable-web`                  | `MAILDEV_DISABLE_WEB`      | Disable the use of the web interface. Useful for unit testing                             |\n| `--hide-extensions \u003cextensions\u003e` | `MAILDEV_HIDE_EXTENSIONS`  | Comma separated list of SMTP extensions to NOT advertise (SMTPUTF8, PIPELINING, 8BITMIME) |\n| `-o, --open`                     |                            | Open the Web GUI after startup                                                            |\n| `-v, --verbose`                  |                            |                                                                                           |\n| `--silent`                       |                            |                                                                                           |\n| `--log-mail-contents`            |                            | Log a JSON representation of each incoming mail                                           |\n\n## API\n\nMailDev can be used in your Node.js application. For more info view the\n[API docs](https://github.com/maildev/maildev/blob/master/docs/api.md).\n\n```javascript\nconst MailDev = require(\"maildev\");\n\nconst maildev = new MailDev();\n\nmaildev.listen();\n\nmaildev.on(\"new\", function (email) {\n  // We got a new email!\n});\n```\n\nMailDev also has a **REST API**. For more info\n[view the docs](https://github.com/maildev/maildev/blob/master/docs/rest.md).\n\n## Outgoing email\n\nMaildev optionally supports selectively relaying emails to an outgoing SMTP server. If you configure outgoing\nemail with the --outgoing-* options you can click \"Relay\" on an individual email to relay through MailDev out\nto a real SMTP service that will *actually\\* send the email to the recipient.\n\nExample:\n\n    $ maildev --outgoing-host smtp.gmail.com \\\n              --outgoing-secure \\\n              --outgoing-user 'you@gmail.com' \\\n              --outgoing-pass '\u003cpass\u003e'\n\n### Auto relay mode\n\nEnabling the auto relay mode will automatically send each email to it's recipient\nwithout the need to click the \"Relay\" button mentioned above.\nThe outgoing email options are required to enable this feature.\n\nOptionally, you can specify a single email address to which Maildev will forward\nall emails instead of the original recipient. For example, using\n`--auto-relay you@example.com` will forward all emails to that address\nautomatically.\n\nAdditionally, you can pass a valid json file with additional configuration for\nwhich email addresses you would like to `allow` or `deny`. The last matching\nrule in the array will be the rule MailDev will follow.\n\nExample:\n\n    $ maildev --outgoing-host smtp.gmail.com \\\n              --outgoing-secure \\\n              --outgoing-user 'you@gmail.com' \\\n              --outgoing-pass '\u003cpass\u003e' \\\n              --auto-relay \\\n              --auto-relay-rules file.json\n\nRules example file:\n\n```javascript\n[\n  { \"allow\": \"*\" },\n  { \"deny\": \"*@test.com\" },\n  { \"allow\": \"ok@test.com\" },\n  { \"deny\": \"*@utah.com\" },\n  { \"allow\": \"johnny@utah.com\" }\n]\n```\n\nThis would allow `angelo@fbi.gov`, `ok@test.com`, `johnny@utah.com`, but deny\n`bodhi@test.com`.\n\n## Configure your project\n\nConfigure your application to send emails via port `1025` and open `localhost:1080` in your browser.\n\n**Nodemailer (v1.0+)**\n\n```javascript\n// We add this setting to tell nodemailer the host isn't secure during dev\nprocess.env.NODE_TLS_REJECT_UNAUTHORIZED = \"0\";\n\nconst transport = nodemailer.createTransport({\n  port: 1025,\n  // other settings...\n});\n```\n\n**Django** -- Add `EMAIL_PORT = 1025` in your settings file [[source]](https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-EMAIL_PORT)\n\n**Rails** -- config settings:\n\n```ruby\nconfig.action_mailer.delivery_method = :smtp\n    config.action_mailer.smtp_settings = {\n        address: \"localhost\",\n        port: 1025,\n        enable_starttls_auto: false\n    }\n```\n\n**Drupal** -- Install and configure [SMTP](https://www.drupal.org/project/smtp) module or use a library like [SwiftMailer](http://swiftmailer.org/).\n\n**Spring Boot** -- configuration:\n\u003cbr/\u003e\nin application.properties file:\n```\nspring.mail.host=localhost #where the smtp server is running\nspring.mail.port=1025\nspring.mail.username=no-reply@gmail.com\nspring.mail.properties.mail.smtp.starttls.enable=true\nspring.mail.properties.mail.smtp.starttls.required=true\nspring.mail.properties.mail.smtp.auth=true\nspring.mail.properties.mail.smtp.connectiontimeout=5000\nspring.mail.properties.mail.smtp.timeout=5000\nspring.mail.properties.mail.smtp.writetimeout=5000\n```\nOr in application.yml file:\u003cbr/\u003e\n```\nspring:\n    mail:\n        properties:\n            mail:\n                smtp:\n                    starttls:\n                        enable: true\n                        required: true\n                    auth: true\n                    connectiontimeout: 5000\n                    timeout: 5000\n                    writetimeout: 5000\n        host: localhost\n        port: 1025\n```\n\n## Features\n\n- Toggle between HTML, plain text views as well as view email headers\n- Test responsive emails with resizable preview pane available for various screen sizes\n- Ability to receive and view email attachments\n- WebSocket integration keeps the interface in sync once emails are received\n- Command line interface for configuring SMTP and web interface ports\n- Ability to relay email to an upstream SMTP server\n\n## Ideas\n\nIf you're using MailDev and you have a great idea, I'd love to hear it. If you're not using MailDev because it lacks a feature, I'd love to hear that too. Add an issue to the repo [here](https://github.com/maildev/maildev/issues/new).\n\n## Contributing\n\nAny help on MailDev would be awesome. There is plenty of room for improvement. Feel free to [create a Pull Request](https://github.com/maildev/maildev/issues/new) from small to big changes.\n\nTo run **MailDev** during development:\n\n    npm install\n    npm run dev\n\nThe \"dev\" task will run MailDev using nodemon and restart automatically when\nchanges are detected. On `*.scss` file save, the css will also be recompiled.\nUsing `test/send.js`, a few test emails will be sent every time the application\nrestarts.\n\nIf you want to debug you can use the `nodemon` debug profile in VSCode. To change arguments or environment variables edit the `.vscode\\launch.json`.\n\nThe project uses the [JavaScript Standard coding style](https://standardjs.com).\nTo lint your code before submitting your PR, run `npm run lint`.\n\nTo run the test suite:\n\n    $ npm test\n\n## [Changelog](https://github.com/maildev/maildev/releases)\n\n## Thanks\n\n**MailDev** is built on using great open source projects including\n[Express](http://expressjs.com),\n[AngularJS](http://angularjs.org/),\n[Font Awesome](http://fontawesome.io/) and two great projects from\n[Andris Reinman](https://github.com/andris9):\n[smtp-server](https://github.com/nodemailer/smtp-server)\nand [mailparser](https://github.com/nodemailer/mailparser).\nMany thanks to Andris as his projects are the backbone of this app and to\n[MailCatcher](http://mailcatcher.me/) for the inspiration.\n\nAdditionally, thanks to all the awesome [contributors](https://github.com/maildev/maildev/graphs/contributors)\nto the project.\n\n## License\n\nMIT\n","funding_links":[],"categories":["SCSS","Sending","developer-tools","testing"],"sub_categories":["Email Testing Application"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaildev%2Fmaildev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaildev%2Fmaildev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaildev%2Fmaildev/lists"}