Aleksander Machniak
2015-09-13 e250f00d90df4a782639b868e619e539785122fb
Fix PHP warnings when sending mailvelope-encrypted mail
1 files modified
11 ■■■■ changed files
program/steps/mail/sendmail.inc 11 ●●●● patch | view | raw | blame | history
program/steps/mail/sendmail.inc
@@ -252,9 +252,10 @@
    $isHtml = false;
    // clear unencrypted attachments
    foreach ($COMPOSE['attachments'] as $attach) {
    foreach ((array) $COMPOSE['attachments'] as $attach) {
        $RCMAIL->plugins->exec_hook('attachment_delete', $attach);
    }
    $COMPOSE['attachments'] = array();
}
@@ -504,13 +505,7 @@
        'PGP/MIME version identification'
    );
    // patch filename out of the version part
    foreach ($MAIL_MIME->_parts as $_i => $_part) {
        if ($_part['c_type'] == 'application/pgp-encrypted') {
            $MAIL_MIME->_parts[$_i]['name'] = '';
            break;
        }
    }
    // @TODO: remove filename out of the version part, required Mail_Mime changes
    $MAIL_MIME->addAttachment(
        $pgp_mime,