1.0.0 • Published 4 years ago

mercury-fake-smtp-server v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

📧 Mercury

Build

Dead simple fake SMTP and POP3 mail server for development and testing purposes.

Test the email delivery of your application over SMTP and browse the emails with your preferred email client over POP3.

Install

npm install -g mercury-fake-smtp-server

Usage

λ mercury-fake-smtp-server --[OPTION]

In the majority of cases you do not need to pass any options, since the default values should work well for most tests.

Options

PropertyDescriptionTypeDefault
hostThe hostname from which SMTP and POP3 should accept connectionsstring0.0.0.0
directoryThe directory to which the mail store should save its received mails (as .eml)string{TMP}/mercury/mails
smtp-portThe SMTP-Port to be used for the default SMTP-Connectionnumber587
smtp-tls-portThe SMTP-Port to be used for the TLS SMTP-Connection. If 0 the SMTP TLS-Server will not startnumber465
pop3-portThe POP3-Port to be used for the default POP3-Connection.number110
pop3-tls-portThe POP3-Port to be used for the TLS POP3-Connection. If 0 the POP3 TLS-Server will not startnumber995
clearIf supplied, the mail store will remove all not yet deleted mails before starting the serverbooleanfalse

Examples

Simple use of Mercury with all default values.

λ mercury-fake-smtp-server
[2020-04-10 10:00:00] INFO  SMTP Server listening on 0.0.0.0:587
[2020-04-10 10:00:00] INFO  Secure SMTP Server listening on 0.0.0.0:465
POP3 Server started on 0.0.0.0:110
Secure POP3 Server started on 0.0.0.0:995

Start Mercury without POP3-TLS and clear the mail store.

λ mercury-fake-smtp-server --pop3-tls-port 0 --clear
Clearing directory [...]\mercury\mails from *.eml files
5 *.eml file(s) deleted
[2020-04-10 10:00:00] INFO  SMTP Server listening on 0.0.0.0:587
[2020-04-10 10:00:00] INFO  Secure SMTP Server listening on 0.0.0.0:465
POP3 Server started on 0.0.0.0:110