We recommend using SendGrid Java, our client library, available on GitHub, with full documentation.
Do you have an API Key yet? If not, go get one. You're going to need it to integrate!
1// using SendGrid's Java Library2// https://github.com/sendgrid/sendgrid-java3import com.sendgrid.*;4import java.io.IOException;56class Example {7private fun sendEmail() {89val sendgrid = SendGrid("SENDGRID_APIKEY")10val email = SendGrid.Email()1112email.addTo("test@sendgrid.com")13email.setFrom("you@youremail.com")14email.setSubject("Sending with SendGrid is Fun")15email.setHtml("and easy to do anywhere, even with Kotlin")1617val response = sendgrid.send(email)18}19}