17 foreach ($mailValueObjects as $mailValueObject) {
20 $array[
'from'] = $mailValueObject->getFrom();
21 $array[
'recipients'] = $mailValueObject->getRecipients();
22 $array[
'recipients_cc'] = $mailValueObject->getRecipientsCC();
23 $array[
'recipients_bcc'] = $mailValueObject->getRecipientsBCC();
24 $array[
'attachments'] = $mailValueObject->getAttachments();
25 $array[
'body'] = $mailValueObject->getBody();
26 $array[
'subject'] = $mailValueObject->getSubject();
27 $array[
'is_using_placholders'] = $mailValueObject->isUsingPlaceholders();
28 $array[
'should_save_in_sent_box'] = $mailValueObject->shouldSaveInSentBox();
30 $mailArray[] = $array;
33 return json_encode($mailArray);
43 $array = json_decode($json,
true);
45 foreach ($array as $objectValues) {
47 $objectValues[
'from'],
48 $objectValues[
'recipients'],
49 $objectValues[
'recipients_cc'],
50 $objectValues[
'recipients_bcc'],
51 $objectValues[
'subject'],
52 $objectValues[
'body'],
53 $objectValues[
'attachments'],
54 $objectValues[
'is_using_placholders'],
55 $objectValues[
'should_save_in_sent_box']
convertFromJson(string $json)
convertToJson(array $mailValueObjects)