note 96542 added to function.openssl-pkcs7-encrypt

From: Date: Thu, 04 Mar 2010 10:30:18 +0000
Subject: note 96542 added to function.openssl-pkcs7-encrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-166645@lists.php.net to get a copy of this message
For everyone who spent lots of time trying to encrypt multipart/alternative emailwith no success: 1.) put complete email (header together with body) into file to encrypt as in example from koen: <?php $body = file_get_contents("body.txt"); $msg = $enc_header.$body; file_put_contents("msg.txt", $msg); ?> 2.) headers array sent to openssl_pkcs7_encrypt cant contain some of headers, it conflicts/doubles and some clients have problems with it - i.e. Thunderbird dont show you email body. For me worked headers: "Subject", "To", "From", "Reply-To", "Date","Return-Receipt","Message-ID","CC", "X-Priority", "X-Mailer" one more thing - if your public key for encryption is not working, check if you are sending certificate with key, not only pure key(must be certificate) Good luck to everyone, its a little bit hard because of small amount of documentation which is sometimes confusing... ---- Server IP: 69.147.83.197 Probable Submitter: 78.141.127.161 ---- Manual Page -- http://www.php.net/manual/en/function.openssl-pkcs7-encrypt.php Edit -- https://master.php.net/note/edit/96542 Del: integrated -- https://master.php.net/note/delete/96542/integrated Del: useless -- https://master.php.net/note/delete/96542/useless Del: bad code -- https://master.php.net/note/delete/96542/bad+code Del: spam -- https://master.php.net/note/delete/96542/spam Del: non-english -- https://master.php.net/note/delete/96542/non-english Del: in docs -- https://master.php.net/note/delete/96542/in+docs Del: other reasons-- https://master.php.net/note/delete/96542 Reject -- https://master.php.net/note/reject/96542 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166645) next »