I have a PHP server side script and I need to send an email but cannot find an example on how to format the payload. This is what I have but am getting a rest exception saying the email address is invalid. How should i format the payload for my email service?
$email_content = [
'template' => 'retired__form',
'to'=> [
'name' => $org_admin_name,
'email' => $org_admin_email
],
'subject' => 'Retired Form Failure',
'body_text' => 'Hi {name}, This is a notification for a retired form submission.',
'from_name' => 'XXX Notifications',
'from_email' => 'notifications@abc.com',
'reply_to_name' => 'XXX Support',
'reply_to_email' => 'support@abc.com',
'org_admin_name' => $org_admin_name,
'auditor' => $this_auditor,
'form_name' => $form_name_pretty,
'submission_date' => $nicedate,
'institution' => $this_institution
];