1.0.0 • Published 5 years ago
mercury-fake-smtp-server v1.0.0
📧 Mercury
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
Property | Description | Type | Default |
---|---|---|---|
host | The hostname from which SMTP and POP3 should accept connections | string | 0.0.0.0 |
directory | The directory to which the mail store should save its received mails (as .eml) | string | {TMP}/mercury/mails |
smtp-port | The SMTP-Port to be used for the default SMTP-Connection | number | 587 |
smtp-tls-port | The SMTP-Port to be used for the TLS SMTP-Connection. If 0 the SMTP TLS-Server will not start | number | 465 |
pop3-port | The POP3-Port to be used for the default POP3-Connection. | number | 110 |
pop3-tls-port | The POP3-Port to be used for the TLS POP3-Connection. If 0 the POP3 TLS-Server will not start | number | 995 |
clear | If supplied, the mail store will remove all not yet deleted mails before starting the server | boolean | false |
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
1.0.0
5 years ago