SendGrid is also known as Twilio SendGrid is an email marketing and SMTP service platform to send bulk emails with extremely high email deliverability rates. SendGrid provides consumer communication transactional and marketing emails. it also provides communication over SMS, voice, and push notification.
It provides reports for email opens, unsubscribes, bounces, spam, links click tracking, etc.
Twilio SendGrid Web API endpoints Latest Version is v3. to access V3 Web API, SendGrid provides 3.X.X library, it fully supports new v3 /mail/send.
The Twilio SendGrid, for the first 30 days sends up to 40,000 emails then sends 100 emails/day free forever.
Prerequisite
SendGrid 3.X.X library requires Java 8 or 11
SendGrid API key, generate from here
SendGrid Gradle build
plugins {
id 'java'
}
group = 'org.wesome'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
implementation 'com.sendgrid:sendgrid-java:4.7.5'
implementation 'commons-logging:commons-logging:1.2'
}
test {
useJUnitPlatform()
}
How to Start with SendGrid
SendGrid provides 2 ways to send mail.
- Modify existing SMTP server and use existing code - it will not leverage the best features provided by SendGrid.
- integrate with send grid V3 API, supports Java, C#, Go, Node.js, PHP, Python, and Ruby - requires a code change, but adds a lot of new features.