@raabbajam/pluto-email
v1.2.13
Published
<big><h1 align="center">pluto-email</h1></big>
Readme
pluto-email
This module will start a mail server to receive incoming email.
It has three functionality:
- HTTP-Server. Run a http server to receive incoming email.
- FTP-Client. Put a file on ftp client.
- Event-emitter. Attach handler and emit data on event.
Install
npm i -D pluto-emailUsage
- Generate random email address that you want to use as an email receiver
- Tell the sender to let them know you expect them to send an email to the generated random email address
- Listen to the specified email address, validated the email subject and only process the expected message
import plutoEmail from "pluto-email"
const emailAddress = plutoEmail.generateAddress(); // true
askMessageToBeSentToThisAddress(emailAddress)
.then(() => plutoEmail.waitMessageFor(emailAddress, [optionalValidation, timeout, options]))
.then((message) => {
// message contain data message, sender, etc.
});License
MIT © Raabb Ajam
