sendEmailWithQueueWithHttpInfo method

Future<Response> sendEmailWithQueueWithHttpInfo(
  1. String inboxId,
  2. bool validateBeforeEnqueue,
  3. SendEmailOptions sendEmailOptions
)

Send email with queue

Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.

Note: This method returns the HTTP Response.

Parameters:

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

  • bool validateBeforeEnqueue (required): Validate before adding to queue

  • SendEmailOptions sendEmailOptions (required):

Implementation

Future<Response> sendEmailWithQueueWithHttpInfo(String inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions,) async {
  // ignore: prefer_const_declarations
  final path = r'/inboxes/{inboxId}/with-queue'
    .replaceAll('{inboxId}', inboxId);

  // ignore: prefer_final_locals
  Object? postBody = sendEmailOptions;

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

    queryParams.addAll(_queryParams('', 'validateBeforeEnqueue', validateBeforeEnqueue));

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


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