Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 486 Bytes

twilio-email.md

File metadata and controls

13 lines (8 loc) · 486 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.

mail_client = TwilioEmail::API(username: ENV['TWILIO_API_KEY'], password: ENV['TWILIO_API_SECRET'])

# or

mail_client = TwilioEmail::API(username: ENV['TWILIO_ACCOUNT_SID'], password: ENV['TWILIO_AUTH_TOKEN'])

This client has the same interface as the SendGrid::API client.