forwardEmail method

Future<SentEmailDto?> forwardEmail(
  1. String emailId,
  2. ForwardEmailOptions forwardEmailOptions
)

Forward email to recipients

Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the from option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.

Parameters:

Implementation

Future<SentEmailDto?> forwardEmail(String emailId, ForwardEmailOptions forwardEmailOptions,) async {
  final response = await forwardEmailWithHttpInfo(emailId, forwardEmailOptions,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SentEmailDto',) as SentEmailDto;

  }
  return null;
}