Skip to content

A small nodejs block that enables you to send emails via sendgrid (sendgrid account needed but its FREE)

Notifications You must be signed in to change notification settings

phillipjacobs/sendgrid-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sendEmailViaSendGrid

A small nodejs block that enables you to send emails via sendgrid (sendgrid account needed but its FREE)

STEPS (assuming you signed up for your free sendgrid account)

MAKE SURE YOU HAVE NODE INSTALLED
  1. clone the project

     🔥and there you go. You're done. 🤣 just joking! What do you think i am ??? GOOGLE ?
    

there's still a bit of stuff to be done lol

  1. cd into the project

  2. rename you sendgrid.env.example to sendgrid.env

     (this is just so that when you push to your github,
     the gitignore file i provided will not push the sendgrid.env file)
    
  3. then go get your access token on sendgrid

     (usually `SETTINGS > API KEYS` > you can handle the rest 💪🏼 I know you can 😏)
    
  4. when you have your api access token, open the sendgrid.env file and paste it into the section where it says

     "YOUR SENDGRID API KEY SHOULD COME HERE BETWEEN THESE TWO SINGLE QUOTES" 🤣🤣 lol
    
  5. once you have that sorted out, then type into your terminal: source ./sendgrid.env

     this will make the variable SENDGRID_API_KEY global, so your little script can access it.
    
  6. after that run: npm install --save @sendgrid/mail

  7. you will now need to go into the email.js file and go set some variables like TO and FROM

     Those variables are obviously the email addresses you want to send TO and FROM
    
  8. After that you're all good to go. 🔥 For real this time. just go into your terminal and run: node email.js

  9. TADAAAA 🤪 ** warning... THIS 10th step is not a step lol... ENJOY!!! 🔥💦

About

A small nodejs block that enables you to send emails via sendgrid (sendgrid account needed but its FREE)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published