New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mailquickbulk

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailquickbulk

A Node.js library for sending E-Mail through multiple providers.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

📬 mailQuickBulk

mailQuick is a versatile email sending module for Node.js that supports multiple email service providers. Whether you use MailerSend, SendGrid, Mailjet, Brevo, or Postmark, mailQuick simplifies sending emails through a unified interface. 🚀

🔧 Installation

To get started with mailQuick, you need to install it via npm:

npm install mailquickbulk

🛠️ Configuration

To use mailQuick, you'll need to initialize it with your email service provider's credentials. Here's a brief guide on how to configure each supported provider:

📧 Supported Providers

  • MailerSend
  • SendGrid
  • Mailjet
  • Brevo
  • Postmark

📜 Example Configuration

Here's how you can set up mailQuick for different providers:

const mailQuick = require('mailquick');

// Initialize with provider and credentials
mailQuick.init({
    provider: 'sendgrid',
    apiKey: 'your-sendgrid-api-key',
    from: 'your-email@example.com',
    fromName: 'Your Name'
});

// Send an email
mailQuick.send({
    to: ['mail@gmail.com', 'mail2@gmail.com'],
    subject: 'Hello World',
    html: '<p>This is a test email sent using mailQuick!</p>'
}).then(response => {
    console.log(response); // { status: true, message: 'Mail sent' }
}).catch(error => {
    console.error(error); // { status: false, message: 'Mail not sent' }
});

🛠️ Provider-Specific Setup

MailerSend

mailQuick.init({
    provider: 'mailersend',
    apiKey: 'your-mailersend-api-key',
    from: 'your-email@example.com',
    fromName: 'Your Name'
});

SendGrid

mailQuick.init({
    provider: 'sendgrid',
    apiKey: 'your-sendgrid-api-key',
    from: 'your-email@example.com',
    fromName: 'Your Name'
});

Mailjet

mailQuick.init({
    provider: 'mailjet',
    apiKey: 'your-mailjet-api-key',
    apiSecret: 'your-mailjet-api-secret',
    from: 'your-email@example.com',
    fromName: 'Your Name'
});

Brevo

mailQuick.init({
    provider: 'brevo',
    apiKey: 'your-brevo-api-key',
    from: 'your-email@example.com',
    fromName: 'Your Name'
});

Postmark

mailQuick.init({
    provider: 'postmark',
    apiKey: 'your-postmark-api-key',
    from: 'your-email@example.com',
    fromName: 'Your Name'
});

🌐 Usage

Use the send method to dispatch an email. The required parameters are:

  • to - Recipient email address.
  • subject - Email subject.
  • html - Email body in HTML format.

Example:

mailQuick.send({
    to: ['mail@gmail.com', 'mail2@gmail.com'],
    subject: 'Welcome!',
    html: '<p>Thanks for signing up with mailQuick!</p>'
}).then(response => {
    console.log(response); // { status: true, message: 'Mail sent' }
}).catch(error => {
    console.error(error); // { status: false, message: 'Mail not sent' }
});

🛡️ Error Handling

If something goes wrong, mailQuick will return an object with status: false and a corresponding error message. Always handle these responses to ensure proper error management.

💬 Contributing

We welcome contributions to mailQuick! If you have suggestions, bug fixes, or improvements, please submit a pull request or open an issue on our GitHub repository.

📝 License

mailQuick is licensed under the MIT License. See LICENSE for more details.

👋 Acknowledgments

Special thanks to the maintainers and contributors of the email service providers' APIs for making this package possible.

Keywords

mail

FAQs

Package last updated on 06 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts