Closed Jako closed 3 years ago
Don't reset $modx->mail in the autoresponder.
The autoresponder could have string based attachments with the following code in a hook before FormItAutoResponder without the reset.
$pdf = … /** $mail modPHPMailer */ $hook->modx->getService('mail', 'mail.modPHPMailer'); $hook->modx->mail->mailer->addStringAttachment($pdf, 'attachment.pdf');
Since $modx->mail is reset in the email hook (https://github.com/Sterc/FormIt/blob/develop/core/components/formit/src/FormIt/Hook/Email.php#L315-L318), the reset is not necessary in the autoresponder.
none
What does it do?
Don't reset $modx->mail in the autoresponder.
Why is it needed?
The autoresponder could have string based attachments with the following code in a hook before FormItAutoResponder without the reset.
Since $modx->mail is reset in the email hook (https://github.com/Sterc/FormIt/blob/develop/core/components/formit/src/FormIt/Hook/Email.php#L315-L318), the reset is not necessary in the autoresponder.
Related issue(s)/PR(s)
none