Using the RestComm API, you can send Emails through a simple request.
A new Email Message can be sent by using the newEmail() method of the Email class.
String FromUser; String ToUser; String MessageBody; . . . Email.newEmail().From(FromUser).To(ToUser).Body(MessageBody).sendEmail();
====List of Parameters for Sending Email
| Parameter | Method |
|---|---|
From |
From(). |
To |
To(). |
Body |
Body(). |
Subject |
Subject(). |
BCC |
BCC(). |
CC |
CC(). |
In order to capture the new Email sent,
Email message = Email.newEmail().From(FromUser).To(ToUser).Body(MessageBody).sendEmail();
You can also access some of the fields of the Email captured,
String AccountSid; AccountSid = message.getAccount_sid();