sendEmail method
Send Email
Send an email from an inbox's email address. The request body should contain the SendEmailOptions
that include recipients, attachments, body etc. See SendEmailOptions
for all available properties. Note the inboxId
refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method sendEmailAndConfirm
.
Parameters:
-
String inboxId (required): ID of the inbox you want to send the email from
-
SendEmailOptions sendEmailOptions (required):
Implementation
Future<void> sendEmail(String inboxId, SendEmailOptions sendEmailOptions,) async {
final response = await sendEmailWithHttpInfo(inboxId, sendEmailOptions,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}