Skip to content

Commit

Permalink
[Update] Add additional mail options and adjust payload for request
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Sep 9, 2022
1 parent bf1df97 commit d5a73ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Email/EmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function send(array $parameters)
{
$this->call(
(new EmailOptions(Options::MODE_CREATE))
->validate($parameters),
->validate(['message' => $parameters]),
self::METHOD_CREATE
);

Expand Down
22 changes: 16 additions & 6 deletions src/Controller/Options/EmailOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ final class EmailOptions extends Options
protected function configure(): void
{
$this->set(Options::MODE_CREATE, [
'broker_id',
'snippet_id',
'cc',
'to',

'message_attachment_ids',
'message' => [
'broker_id',
'snippet_id',
'subject',
'body',
'from',
'to',
'cc',
'bcc',
'client_ids',
'property_ids',
'project_ids',
'message_attachment_ids',
'client_source_id',
'message_category_id'
]
]);
}
}

0 comments on commit d5a73ea

Please sign in to comment.