comAtprotoAdminSendEmail function

Future<XRPCResponse<AdminSendEmailOutput>> comAtprotoAdminSendEmail({
  1. required String recipientDid,
  2. required String content,
  3. String? subject,
  4. required String senderDid,
  5. String? comment,
  6. required ServiceContext $ctx,
  7. Map<String, String>? $headers,
  8. Map<String, String>? $unknown,
})

Send email to a user's account email address.

Implementation

Future<XRPCResponse<AdminSendEmailOutput>> comAtprotoAdminSendEmail({
  required String recipientDid,
  required String content,
  String? subject,
  required String senderDid,
  String? comment,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoAdminSendEmail,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'recipientDid': recipientDid,
    'content': content,
    if (subject != null) 'subject': subject,
    'senderDid': senderDid,
    if (comment != null) 'comment': comment,
  },
  to: const AdminSendEmailOutputConverter().fromJson,
);