sendAccountEmail function

Future<ApiResponse<Object?>> sendAccountEmail(
  1. ExsitedClient client,
  2. Object accountId,
  3. Object payload, {
  4. bool? raiseOnError,
  5. String? responseFormat,
})

POST /api/{api_version}/accounts/{account_id}/communications/emails

Send an email and log it on the account; to, subject, body, cc and bcc with no envelope. It sends real mail.

No typed view. Read response.map.

Implementation

Future<ApiResponse<Object?>> sendAccountEmail(
  ExsitedClient client,
  Object accountId,
  Object payload, {
  bool? raiseOnError,
  String? responseFormat,
}) =>
    client.sendPostRequest(AccountsUrls.accountEmails,
        pathParams: {'account_id': accountId},
        jsonBody: payload,
        raiseOnError: raiseOnError,
        responseFormat: responseFormat);