Email Sender Service

NPM GitHub

đź“§ Description

A simple Node.js application that sends emails using the nodemailer package. This service ensures smooth email delivery with minimal setup.

🚀 Features

Lightweight and customizable codebase.
Designed …


This content originally appeared on DEV Community and was authored by Yadab Sutradhar

NPM GitHub

đź“§ Description

A simple Node.js application that sends emails using the nodemailer package. This service ensures smooth email delivery with minimal setup.

🚀 Features

  • Lightweight and customizable codebase.
  • Designed to be beginner-friendly.
  • Easy to configure.
  • Helpful for job seekers to send emails to hiring managers and recruiters with bulk/batch for free!

🛠️ Prerequisites

Before starting, make sure you have the following installed on your system:

  • Node.js (v18 or higher)
  • npm or yarn

Usage

Step 1 - Installation

npm install job-email-sender
yarn add job-email-sender

Step 2 - Configuration

Add this code to your program file-

const emailConfig = {
  service: 'your-email-service', // Example- `gmail`, `yahoo` etc.
  user: 'your-email@example.com', // your email address (sender/from)
  pass: 'your-email-password', // your app password for your email account
  name: 'your-display-name'
};

Notes:

  1. Replace placeholders like your-email@example.com, your-display-name, with your actual details.
  2. Use gmail, yahoo etc. in service placeholder. Whereever is your actual email account in.
  3. For pass, this is not your email login password. It is a app password which can be collected from your email account. For details follow-

Enable App Passwords:

Yahoo : Follow instructions to get app password for yahoo mail.

Gmail : Follow Google App Password to get app password.

Other Services : Follow their own instructions to get app password.

Step 3 - Apply

For JavaScript Users:

const { EmailSender } = require('job-email-sender')

For TypeScript Users:

import { EmailSender } from 'job-email-sender'

Construct & send

const emailSender = new EmailSender(emailConfig)

const contacts = [{ email: 'receiver-name@example.com', name: 'Don' }]
const message = 'Hello ${name}, this is your email content!' // you can add html here. Example - 'Hello ${name}, <p><b>this</b> is a test email!</p>'
const subject = 'This is Your Email subject'

emailSender
  .sendEmails(contacts, message, subject)
  .then((message) => {
    console.log(message)
  })
  .catch((error) => {
    console.error(error)
  })

[!Note] Remember !
This package is primarily for backend usage only. Because it is node.js based and that doesn't run on browser.
If you want to use this on frontend (browser), you need to run your frontend on server (server-side rendering) using express.

[!Note]
Managing attachments - Coming soon...


This content originally appeared on DEV Community and was authored by Yadab Sutradhar


Print Share Comment Cite Upload Translate Updates
APA

Yadab Sutradhar | Sciencx (2025-01-26T02:52:43+00:00) Email Sender Service. Retrieved from https://www.scien.cx/2025/01/26/email-sender-service/

MLA
" » Email Sender Service." Yadab Sutradhar | Sciencx - Sunday January 26, 2025, https://www.scien.cx/2025/01/26/email-sender-service/
HARVARD
Yadab Sutradhar | Sciencx Sunday January 26, 2025 » Email Sender Service., viewed ,<https://www.scien.cx/2025/01/26/email-sender-service/>
VANCOUVER
Yadab Sutradhar | Sciencx - » Email Sender Service. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/26/email-sender-service/
CHICAGO
" » Email Sender Service." Yadab Sutradhar | Sciencx - Accessed . https://www.scien.cx/2025/01/26/email-sender-service/
IEEE
" » Email Sender Service." Yadab Sutradhar | Sciencx [Online]. Available: https://www.scien.cx/2025/01/26/email-sender-service/. [Accessed: ]
rf:citation
» Email Sender Service | Yadab Sutradhar | Sciencx | https://www.scien.cx/2025/01/26/email-sender-service/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.