postNotifySendEmail method

Future<Object?> postNotifySendEmail(
  1. NotifySend notifySend
)

Delivers one transactional email through the caller org's own provider credential.

Delivers one transactional email through the caller org's own provider credential. It is the channel-pinned form of the generic send: identical in every respect except that the channel is fixed to email, OVERRIDING whatever the body names — so a body that says sms still goes out as mail. The provider is the org's own email credential from KMS (Twilio Email, then SMTP), resolved for the validated principal's org; an unauthenticated caller gets 401. Subject is carried on the email channel only.

Parameters:

Implementation

Future<Object?> postNotifySendEmail(NotifySend notifySend,) async {
  final response = await postNotifySendEmailWithHttpInfo(notifySend,);
  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), 'Object',) as Object;

  }
  return null;
}