1.0.5 • Published 4 years ago

mail43 v1.0.5

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

/* * * mail43 * */ const mail43 = require('mail43');

// declaring an email account const EMAIL_ACCOUNT = new mail43.account(app, 'YOURDOMAIN.COM', { host: 'smtp.example.com', port: 465, use_tls: true, username: 'no-reply@example.com', password: 'Your email password' });

// verifying an user const verification = EMAIL_ACCOUNT.verify('example@gmail.com', { subject: 'Email verification test', body: 'Hello world!<br>Press this button: {button}<br>Or if it doesn't work, use this link {link}' }, 'YOUR_REDIRECT_URL', feed)

// handling feeds function feed(callback_type, data){ if(callback_type === 'error') throw new Error(data); else if(callback_type === 'sended') console.log("Sended email verification (UUID: %s", data); else if(callback_type === 'verified' && data === verification) console.log("User verified the Email Account, UUID: %s", data); }

// Starting server app.listen(3000);

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago