$mail->
addTo($mailData['to'
]);
if ($mailData['isHtml'
]) { $mail->
setBodyHtml($mailData['bodyHtml'
]);
} else { $mail->
setBodyText($mailData['bodyText'
]);
} $mail =
$this->
addAttachments($mail,
$orderId,
$mailData['attachments'
]);
$mail->
setAssociation(LogEntryBuilder::ORDER_ID_ASSOCIATION,
$orderId);
$this->
get('modules'
)->
Order()->
sendStatusMail($mail);
$this->
View()->
assign([ 'success' => true,
'data' =>
$data,
]);
} /**
* Deletes a document by the requested document id.
*
* @return void
*/