This is a simple nodejs server that takes in the inputs and sends the mail using nodemailer. You set your own cover letter template first during setup and headline and it sends the mail to the given email address without opening mail app and no changes to format, just a few inputs. You can also attach your resumes to the mail. You can make different routes for different roles and different cover letter templates. Its just a basic utility application. If you have a list of emails and details, you can do them all at once, using a loop and an array of objects using minor tweeks to the code.
git clone https://github.com/avneets2103/coldMailer.git
npm i
PORT = 5000
MAIL_PASSWORD = "bajdcbaskjcdsaaasdcas"
MAIL_USER = johndoe@gmail.com
USER_NAME = john
Note:
You can choose any available port
You have to generate an app password for your google account, and use that password in the .env file as
MAIL_PASSWORD
and the same gmail account inMAIL_USER
.
The USER_NAME is the name of the user who will be sending the mails, you can change it to your name
Go to your google account, go to security settings, make sure you have 2 factor authentication enabled, then search app passwords
in the search box and generate a new app password, copy it and paste it in the .env file.
Video reference:
https://www.youtube.com/watch?v=MkLX85XU5rU
Over here you have to change your CoverLetter template according to your needs, and take these inputs just the way I am doing it.
Also replace my resume with your resume, and change the file path accordingly. You can also change the headlines according to your needs.
const cgpa = "add gpa if you want to include cgpa in the cover letter";
export const MLCoverLetter = ( date, EName, companyName, companyAddress,specificPosition, foundWhere, aboutCompany) => `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cover Letter</title>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.6;">
<!-- Change as per your cv and take the inputs as per your needs -->
</body>
</html>
`
export const DevCoverLetter = ( date, EName, companyName, companyAddress,specificPosition, foundWhere, aboutCompany) => `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cover Letter</title>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.6;">
<!-- Change as per your cv and take the inputs as per your needs -->
</body>
</html>
`
export const MLResumePath = "your resume path"
export const DevResumePath = "your resume path"
export const MLHeadline = "your mail headline"
export const DevHeadline = "your mail headline"
npm run dev
Something like this (post -> raw -> json)
{
"recEmail":"yenseng.nvidia@gmail.com",
"date":"13th June 2024",
"EName":"Avneet Singh Bedi",
"companyName":"NVIDIA",
"companyAddress":"Banglore",
"specificPosition": "SDE Role",
"foundWhere":"Linkedin",
"aboutCompany":"stonks"
}
Note: I have also added the postman collection json for the same, so you can export it to postman and use it.
THANK YOU FOR READING, PLS CLONE/FORK AND ⭐ THIS REPO, THANKS