Description: Curious about how to Send Mails using SendGrid in NodeJs App? Read this guide to learn everything about SendGrid, including what is SendGrid and Why to use it!
Report
Share
Report
Share
1 of 23
Download to read offline
More Related Content
Similar to How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
The document provides steps to integrate Glip teams using RingCentral APIs and Java SDKs. It outlines 10 steps: 1) Create an application in the RingCentral developer portal and give it Glip permissions, 2) Create a Maven Java project, 3) Add RingCentral Maven dependencies, 4) Create a Java class for integration logic, 5) Get client ID and secret, 6) Make a POST request to create a Glip team, 7) The response contains team details, 8) Run the application to see team details, 9) Integration is complete, 10) Thanks for reading.
Frontend APIs powering fast paced product iterationsKarthik Ramgopal
LinkedIn evolved their frontend APIs over two years to improve developer velocity and scale. They moved to a single flagship API using strongly typed schemas. New view template APIs allow rendering notifications across clients without code changes. TextViewModels and ImageViewModels standardize entity mentions to maintain backward compatibility while improving performance. These changes reduced code size by 80% and increased feature velocity over 3x.
Vandana Dattatray Gaikwad is seeking a challenging position utilizing her knowledge and skills to meet organizational goals. She has a B.E. in computer science and engineering with over 5 years of experience as a MEAN stack developer. Her technical skills include Angular.js, Node.js, MongoDB, DynamoDB, and AWS services. She is proficient in full stack development and has experience deploying APIs on AWS.
Angular 7 Firebase5 CRUD Operations with Reactive FormsDigamber Singh
This document discusses how to create Angular 7 Firebase5 CRUD operations using Reactive Forms. It involves setting up a student record management system where an admin can create, read, update and delete student records. The key steps include setting up an Angular project with Bootstrap and Firebase, creating CRUD services, generating components, setting up routing, and integrating modules like NGX Toastr for alerts.
This tutorial provides an overview of creating a sample Django application that demonstrates basic components including models, views, templates, URLs, forms, and the admin site. Key steps covered include:
- Setting up a Django project in Eclipse with Python, Django, SQLite
- Creating models, views, URLs, and templates
- Using the Django admin site to populate the database
- Displaying model data in templates
- Creating and processing a basic form
Building Your First App with MongoDB StitchMongoDB
MongoDB Stitch is a platform that allows developers to easily access MongoDB databases and integrate with key services. It provides native SDKs, integrated rules and functions to build scalable backends. Requests made through Stitch are parsed, services are orchestrated, rules are applied, and results are returned to clients. Stitch handles authentication, authorization and access controls through user profiles and declarative rules. It is a unified solution for building complete applications that connect to MongoDB and external services securely.
Tutorial: Building Your First App with MongoDB StitchMongoDB
MongoDB Stitch allows developers to easily access and integrate MongoDB databases with key services. It provides integrated rules, functions and SDKs to handle complex connection logic and orchestrate databases and third party services. Requests made through Stitch applications are parsed, services are orchestrated, rules are applied, and results are returned to clients. Stitch offers scalable hosted JavaScript functions and declarative access controls to securely manage data and service access.
How to Send Emails From Odoo 17 Using CodeCeline George
In this slide, we'll explore how to programmatically send emails from Odoo 17. Odoo offers a robust email functionality that can be integrated into your custom modules to automate communication. By leveraging code, you can trigger emails based on specific events or user actions within your Odoo instance. This streamlines workflows and enhances user experience.
This document contains the resume of Ajit Kumar which summarizes his personal details, qualifications, work experience and projects. It shows that he has over 2 years of experience as an Android developer working on various mobile applications. His skills include Android, Java and he has experience with the full software development life cycle from design to implementation.
This document provides an introduction to Angular.js through examples of common tasks like including the Angular library, binding inputs to expressions, using filters to modify output, handling click events with controllers, and creating custom elements with directives. It explains how to accomplish each task concisely with Angular compared to more complex traditional approaches like jQuery. The examples are intended to demonstrate fundamental Angular concepts and capabilities in a practical way.
This document contains a summary of Sandeep Mukherji's contact information, work experience, education, skills, and projects. It lists his contact details, over 10 years of experience in roles such as technical lead and software architect using technologies like AngularJS, jQuery, PHP, and MySQL. It also summarizes several projects involving web development with frameworks like CodeIgnitor, CakePHP and using skills in AngularJS, JavaScript, and databases.
Jitu Sahu is a senior software developer with over 5 years of experience developing applications using technologies like Spring, JSF, Hibernate, Java, and databases like Oracle, MySQL, and Cassandra. He has extensive experience developing and maintaining projects in the travel and telecom domains for companies like Sabre Travel Technologies and Intelligentia IT Software Solution. His technical skills include Spring, JSF, Java 8, databases, AWS, and version control tools like Git.
1) Swati Naik is a software developer from Hyderabad seeking new employment opportunities.
2) She has a BE in IT from 2012 and experience as a .NET developer from 2014-2015.
3) Her skills include C#, ASP.NET, Java, SQL, and she has completed certification courses in .NET and Java.
The document provides information on Node.js, including its definition, advantages, companies that use it, and basic terminology. Node.js is a server-side JavaScript platform that allows building fast and scalable network applications. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient for data-intensive real-time apps. Some key advantages are its use of JavaScript, the fast V8 engine, support for building highly scalable web apps, and thousands of available modules. Major companies like Microsoft, Yahoo, and LinkedIn use Node.js. Basic terminology discussed includes asynchronous programming, npm, Express framework, modules, and REPL.
The document provides guidance on effective unit testing. It recommends writing tests before coding to shape code design and catch errors. An example demonstrates how unit tests revealed a potential bug introduced when another developer changed assumptions without tests. Tests should focus on simple cases, error conditions, and boundaries to future-proof code from changes.
Ghige Rahul Sakharam is a senior software engineer with over 10 years of experience developing websites using technologies like ASP, VB.NET, C#, PHP, MySQL, and WordPress. He has experience leading teams of up to 4 people on projects for clients in various industries. Some of his project experiences include developing e-commerce, alumni portal, healthcare, and education websites. He is looking for a challenging position that allows him to use his skills and experience.
Similar to How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf (20)
The document discusses various alternatives to the React JavaScript framework for building user interfaces. It summarizes a tech talk where React experts discussed alternative frameworks. The main alternatives mentioned include Preact, Inferno JS, Backbone JS, Ember JS, and Vue JS. For each alternative, the document discusses pros and cons compared to React, including characteristics like size, performance, community support, and when each may be preferable to use over React. It provides a high-level overview of the considerations in choosing between React and its alternative frameworks.
Data Science Use Cases in Retail & Healthcare Industries.pdfKaty Slemon
Data science has many useful applications in retail and healthcare. In retail, it allows for personalized recommendations, fraud detection, price optimization, and sentiment analysis. In healthcare, it facilitates medical imaging analysis, genomic research, drug discovery, predictive analytics, disease tracking and prevention, and monitoring through wearable devices. By analyzing customer, patient, and other relevant data, data science helps these industries better meet needs, enhance experiences and outcomes, and improve operations and decision making.
How Much Does It Cost To Hire Golang Developer.pdfKaty Slemon
The document discusses the cost of hiring Golang developers. It begins by providing context on the rise of Golang due to the growth of IoT. The cost of hiring Golang developers depends on factors like experience, location, project size, and engagement model. Hourly rates range from $18-94 in different regions, with rates generally lowest in Asia and highest in North America. Common engagement models include time and materials, fixed price, and dedicated teams. The document aims to help understand the budget needed to hire Golang talent.
Flutter 3 is now stable on macOS and Linux and supports Apple Silicon chips. Key updates include menu support for macOS, Material You design support, improved Firebase integration, foldable device support, and performance improvements for animations and image decoding. Flutter 3 also adds themes extensions and updated ad support while maintaining Flutter's mission of being an open-source, cross-platform framework.
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfKaty Slemon
Looking to Hire Full Stack developer at an affordable rate? Know how much it cost to Hire full stack Developer, types, popular combinations, and hourly rates
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfKaty Slemon
Want to Improve And Scale Your Node js Performance? Check out some Node Js performance optimization tips and tricks for improving your existing Node Js app.
How to Develop Slack Bot Using Golang.pdfKaty Slemon
This document provides a tutorial on how to develop a Slack bot using Golang. It discusses setting up a Slack workspace and creating a Slack app. It then covers installing Golang and the go-slack package to connect the bot to Slack. The tutorial demonstrates sending simple messages and handling events when the bot is mentioned. It includes code examples for connecting to Slack, posting messages, and responding to mention events.
IoT Based Battery Management System in Electric Vehicles.pdfKaty Slemon
Explore India's most advanced cloud platform- IONDASH, responsible for monitoring the performance of battery management system in electric vehicles.
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfKaty Slemon
Is your Laravel app facing performance issues? Here are the proven Laravel Performance Optimization tips to boost app performance and enhance security.
New Features in iOS 15 and Swift 5.5.pdfKaty Slemon
The document discusses new features introduced in iOS 15 and Swift 5.5 including bottom sheet customization with UISheetPresentationController, adding submenus to UIMenu, improved location permission with CLLocationButton, using async/await for asynchronous code, Double and CGFloat being interchangeable types, and using lazy in local contexts. It provides code examples for implementing these new features.
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfKaty Slemon
Description: Looking for a dedicated team to manage your next product successfully? Read this blog to discover how to hire and manage a remote dedicated team.
Choose the Right Battery Management System for Lithium Ion Batteries.pdfKaty Slemon
Find out how to choose the right battery management system for lithium ion batteries by analyzing key parameters like voltage, current, and BMS architecture.
Angular Universal How to Build Angular SEO Friendly App.pdfKaty Slemon
This document discusses how to build an SEO friendly Angular application. It covers what Angular SEO is, why it is important, and two approaches: setting titles and metadata using the Angular meta service, and using Angular Universal for server-side rendering. It provides steps to add meta tags using the meta service and build an application with server-side rendering. The document also includes a link to the GitHub repository containing the demo application code.
Ruby On Rails Performance Tuning Guide.pdfKaty Slemon
Want to know how you can Optimize the Ruby On Rails App? Go through this ultimate guide to get the best tips for improving your Ruby on Rails performance.
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdfKaty Slemon
Check out the ultimate Salesforce ISV guide to expand the growth of your business. Also, know the four main types and benefits of Salesforce ISV Partnerships.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
Coordinate Systems in FME 101 - Webinar SlidesSafe Software
If you’ve ever had to analyze a map or GPS data, chances are you’ve encountered and even worked with coordinate systems. As historical data continually updates through GPS, understanding coordinate systems is increasingly crucial. However, not everyone knows why they exist or how to effectively use them for data-driven insights.
During this webinar, you’ll learn exactly what coordinate systems are and how you can use FME to maintain and transform your data’s coordinate systems in an easy-to-digest way, accurately representing the geographical space that it exists within. During this webinar, you will have the chance to:
- Enhance Your Understanding: Gain a clear overview of what coordinate systems are and their value
- Learn Practical Applications: Why we need datams and projections, plus units between coordinate systems
- Maximize with FME: Understand how FME handles coordinate systems, including a brief summary of the 3 main reprojectors
- Custom Coordinate Systems: Learn how to work with FME and coordinate systems beyond what is natively supported
- Look Ahead: Gain insights into where FME is headed with coordinate systems in the future
Don’t miss the opportunity to improve the value you receive from your coordinate system data, ultimately allowing you to streamline your data analysis and maximize your time. See you there!
Best Programming Language for Civil EngineersAwais Yaseen
The integration of programming into civil engineering is transforming the industry. We can design complex infrastructure projects and analyse large datasets. Imagine revolutionizing the way we build our cities and infrastructure, all by the power of coding. Programming skills are no longer just a bonus—they’re a game changer in this era.
Technology is revolutionizing civil engineering by integrating advanced tools and techniques. Programming allows for the automation of repetitive tasks, enhancing the accuracy of designs, simulations, and analyses. With the advent of artificial intelligence and machine learning, engineers can now predict structural behaviors under various conditions, optimize material usage, and improve project planning.
Implementations of Fused Deposition Modeling in real worldEmerging Tech
The presentation showcases the diverse real-world applications of Fused Deposition Modeling (FDM) across multiple industries:
1. **Manufacturing**: FDM is utilized in manufacturing for rapid prototyping, creating custom tools and fixtures, and producing functional end-use parts. Companies leverage its cost-effectiveness and flexibility to streamline production processes.
2. **Medical**: In the medical field, FDM is used to create patient-specific anatomical models, surgical guides, and prosthetics. Its ability to produce precise and biocompatible parts supports advancements in personalized healthcare solutions.
3. **Education**: FDM plays a crucial role in education by enabling students to learn about design and engineering through hands-on 3D printing projects. It promotes innovation and practical skill development in STEM disciplines.
4. **Science**: Researchers use FDM to prototype equipment for scientific experiments, build custom laboratory tools, and create models for visualization and testing purposes. It facilitates rapid iteration and customization in scientific endeavors.
5. **Automotive**: Automotive manufacturers employ FDM for prototyping vehicle components, tooling for assembly lines, and customized parts. It speeds up the design validation process and enhances efficiency in automotive engineering.
6. **Consumer Electronics**: FDM is utilized in consumer electronics for designing and prototyping product enclosures, casings, and internal components. It enables rapid iteration and customization to meet evolving consumer demands.
7. **Robotics**: Robotics engineers leverage FDM to prototype robot parts, create lightweight and durable components, and customize robot designs for specific applications. It supports innovation and optimization in robotic systems.
8. **Aerospace**: In aerospace, FDM is used to manufacture lightweight parts, complex geometries, and prototypes of aircraft components. It contributes to cost reduction, faster production cycles, and weight savings in aerospace engineering.
9. **Architecture**: Architects utilize FDM for creating detailed architectural models, prototypes of building components, and intricate designs. It aids in visualizing concepts, testing structural integrity, and communicating design ideas effectively.
Each industry example demonstrates how FDM enhances innovation, accelerates product development, and addresses specific challenges through advanced manufacturing capabilities.
Are you interested in dipping your toes in the cloud native observability waters, but as an engineer you are not sure where to get started with tracing problems through your microservices and application landscapes on Kubernetes? Then this is the session for you, where we take you on your first steps in an active open-source project that offers a buffet of languages, challenges, and opportunities for getting started with telemetry data.
The project is called openTelemetry, but before diving into the specifics, we’ll start with de-mystifying key concepts and terms such as observability, telemetry, instrumentation, cardinality, percentile to lay a foundation. After understanding the nuts and bolts of observability and distributed traces, we’ll explore the openTelemetry community; its Special Interest Groups (SIGs), repositories, and how to become not only an end-user, but possibly a contributor.We will wrap up with an overview of the components in this project, such as the Collector, the OpenTelemetry protocol (OTLP), its APIs, and its SDKs.
Attendees will leave with an understanding of key observability concepts, become grounded in distributed tracing terminology, be aware of the components of openTelemetry, and know how to take their first steps to an open-source contribution!
Key Takeaways: Open source, vendor neutral instrumentation is an exciting new reality as the industry standardizes on openTelemetry for observability. OpenTelemetry is on a mission to enable effective observability by making high-quality, portable telemetry ubiquitous. The world of observability and monitoring today has a steep learning curve and in order to achieve ubiquity, the project would benefit from growing our contributor community.
Details of description part II: Describing images in practice - Tech Forum 2024BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfNeo4j
Presented at Gartner Data & Analytics, London Maty 2024. BT Group has used the Neo4j Graph Database to enable impressive digital transformation programs over the last 6 years. By re-imagining their operational support systems to adopt self-serve and data lead principles they have substantially reduced the number of applications and complexity of their operations. The result has been a substantial reduction in risk and costs while improving time to value, innovation, and process automation. Join this session to hear their story, the lessons they learned along the way and how their future innovation plans include the exploration of uses of EKG + Generative AI.
How Social Media Hackers Help You to See Your Wife's Message.pdfHackersList
In the modern digital era, social media platforms have become integral to our daily lives. These platforms, including Facebook, Instagram, WhatsApp, and Snapchat, offer countless ways to connect, share, and communicate.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc
Six months into 2024, and it is clear the privacy ecosystem takes no days off!! Regulators continue to implement and enforce new regulations, businesses strive to meet requirements, and technology advances like AI have privacy professionals scratching their heads about managing risk.
What can we learn about the first six months of data privacy trends and events in 2024? How should this inform your privacy program management for the rest of the year?
Join TrustArc, Goodwin, and Snyk privacy experts as they discuss the changes we’ve seen in the first half of 2024 and gain insight into the concrete, actionable steps you can take to up-level your privacy program in the second half of the year.
This webinar will review:
- Key changes to privacy regulations in 2024
- Key themes in privacy and data governance in 2024
- How to maximize your privacy program in the second half of 2024
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.
Quality Patents: Patents That Stand the Test of TimeAurora Consulting
Is your patent a vanity piece of paper for your office wall? Or is it a reliable, defendable, assertable, property right? The difference is often quality.
Is your patent simply a transactional cost and a large pile of legal bills for your startup? Or is it a leverageable asset worthy of attracting precious investment dollars, worth its cost in multiples of valuation? The difference is often quality.
Is your patent application only good enough to get through the examination process? Or has it been crafted to stand the tests of time and varied audiences if you later need to assert that document against an infringer, find yourself litigating with it in an Article 3 Court at the hands of a judge and jury, God forbid, end up having to defend its validity at the PTAB, or even needing to use it to block pirated imports at the International Trade Commission? The difference is often quality.
Quality will be our focus for a good chunk of the remainder of this season. What goes into a quality patent, and where possible, how do you get it without breaking the bank?
** Episode Overview **
In this first episode of our quality series, Kristen Hansen and the panel discuss:
⦿ What do we mean when we say patent quality?
⦿ Why is patent quality important?
⦿ How to balance quality and budget
⦿ The importance of searching, continuations, and draftsperson domain expertise
⦿ Very practical tips, tricks, examples, and Kristen’s Musts for drafting quality applications
https://www.aurorapatents.com/patently-strategic-podcast.html
3. If you have landed on this blog, you know
the purpose of SendGrid and the
importance of sending mail! You might
want to answer questions like What is
SendGrid, and Why use SendGrid? Don’t
worry! We have this covered!
In this tutorial: How to Set Up and Send
Mails using SendGrid in NodeJs App, we will
answer your questions and discuss them
thoroughly! Trust me and read the blog till
the end to know SendGrid inside out!
Also, many developers use a package named
NodeMailer to send emails. You can also
visit the blog: How to Send Email using
NodeMailer with Gmail & Mailtrap, to learn
more about NodeMailer.
Let’s move on then!
5. I’m new to SendGrid: What is SendGrid?
People appreciating SendGrid: Why use
only SendGrid when you have different
providers?
I’m a technical person. I want to set up
and start using SendGrid with my Node
App: Steps to set up and send emails
using SendGrid in NodeJs app.
Here are your questions and queries! Let’s
have an overview of what our blog has for
you, so you will continue reading till the
end!
Voila! Let’s go!
6. Our clients say Bacancy
provides the best and
highly-skilled developers!
Want the best? Get the best! Contact
Bacancy and hire Node.js developer for your
dream projects!
8. SendGrid is a provider that allows SMTP
(Simple Mail Transfer Protocol) service. I
hope you’re aware of SMTP. It reduces your
time and efforts and provides flexibility
when sending large volumes of emails.
10. Powerful email solution for sending
bulk emails with high deliverability
rates
Provides interactive and eye-catching
built-in email templates and freedom to
edit them as well
With the help of SendGrid, you can
track the real-time performance of
emails using various metrics like
bounce rates, unsubscribers, delivered
emails rate, unique reads/opens/clicks,
and many more.
Exceptional customer support
Sendgrid has been integrated with so
many tools that it lets you centralize the
marketing efforts. The API integration
with the various tools is very powerful.
Coming back to our next question, Why
SendGrid with NodeJS? No beating around
the bush, and here are the reasons why you
should use SendGrid for sending emails.
12. Create a NodeJs application using the below
command.
mkdir SendgridApp
cd SendgridApp
Initialize Project
npm init -y
It will create a package.json file.
We will install the required dependencies in
our project using the below command.
npm i express @sendgrid/mail dotenv
13. Open the root file of our project and name it
as your will.
// app.js
const express = require("express");
require("dotenv").config();
var app = express();
app.use(express.json())
const mailRoute =
require('./routes/sendMail')
app.use(mailRoute)
app.listen(process.env.PORT,
console.log('Server is up and running '+
process.env.PORT))
15. Visit SendGrid.com
Create an account
Choose a plan according to your
requirements
Generate API key
Let’s start with integrating Sendgrid.
For setting up the SendGrid account, follow
these instructions-
For sending emails from our NodeJS app, we
need to configure the SendGrid API key in
the application. The SendGrid gives you the
freedom to set up an email as per your
requirement. We can also add and modify
HTML, images, documents, etc.
16. // email/account.js
const sgMail = require('@sendgrid/mail')
require('dotenv').config()
sgMail.setApiKey(process.env.SENDGRID_
API_KEY) //your sendgrid api key
const sendMail = (email, name) => {
sgMail.send({
To: email, // receiver email address
from: 'fromemail@email.com',
subject: 'here comes subject line',
text: `here comes the body ${name}`
})
}
module.exports = {
sendMail
}
18. We can use the sendgrid function wherever
we want to use it, for example, when a user
is registering or leaving or for some other
notifications.
// sendMail.js
For this example, we are sending mail for a
specified route and call sendMail functions
as per our requirement.
const express = require('express')
const { append } =
require('express/lib/response')
const { sendMail } =
require('../emails/accounts')
const statusCode =
require('../constants/constants')
const router = new express.Router()
19. router.get('/sendmail', (req, res) => {
const user = req.body;
try {
sendMail(user.email,user.name)
res.status(statusCode.ok).send({message:
'Mail Sent'})
} catch (error) {
res.status(statusCode.internalServerError).
send({error})
}
})
module.exports = router
As for this example, we have manually set
the email or other required parameters that
we can send through postman.
22. I hope the purpose of this tutorial: How to
Set Up and Send Mails using SendGrid in
NodeJS app, was useful to you. If you have
any questions or suggestions, please contact
us and share your thoughts! If you are a
NodeJs enthusiast and willing to polish your
knowledge, then the NodeJS tutorials page
is for you! Don’t waste your time and start
learning more about NodeJS technology!
Are you looking for reliable company to
build your application? Contact Bacancy-
the best Node.js development company and
start working with us!