sendAliasEmail method
Send an email from an alias inbox
Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
Parameters:
-
String aliasId (required):
-
SendEmailOptions sendEmailOptions (required):
Implementation
Future<SentEmailDto?> sendAliasEmail(String aliasId, SendEmailOptions sendEmailOptions,) async {
final response = await sendAliasEmailWithHttpInfo(aliasId, sendEmailOptions,);
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;
}