Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 502 Bytes

twilio-email.md

File metadata and controls

11 lines (8 loc) · 502 Bytes

First, follow the Twilio Setup guide for creating a Twilio account and setting up environment variables with the proper credentials.

Then, initialize the Twilio Email Client.

TwilioEmail mailClient = new TwilioEmail(System.getenv("TWILIO_API_KEY"), System.getenv("TWILIO_API_SECRET"));
// or
TwilioEmail mailClient = new TwilioEmail(System.getenv("TWILIO_ACCOUNT_SID"), System.getenv("TWILIO_AUTH_TOKEN"));

This client has the same interface as the SendGrid client.