Jan Vávra - 2012-03-02

Hello,

I've found a small bug in signing mail. I have version 5.1. In the
class.phpmailer.php in function CreateBody, on line 1240 and below. On
successfull @openssl_pkcs7_sign there is unlink of signed file, before reading
it contents: Correct is:

if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file,
array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {

$body = file_get_contents($signed);

@unlink($file);

@unlink($signed);

} else {

...

}

Greetings

Jan