sendEmailWithHttpInfo method

Future<Response> sendEmailWithHttpInfo(
  1. String inboxId,
  2. SendEmailOptions sendEmailOptions
)

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.

Note: This method returns the HTTP Response.

Parameters:

  • String inboxId (required): ID of the inbox you want to send the email from

  • SendEmailOptions sendEmailOptions (required):

Implementation

Future<Response> sendEmailWithHttpInfo(String inboxId, SendEmailOptions sendEmailOptions,) async {
  // ignore: prefer_const_declarations
  final path = r'/inboxes/{inboxId}'
    .replaceAll('{inboxId}', inboxId);

  // ignore: prefer_final_locals
  Object? postBody = sendEmailOptions;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}