diff --git a/examples/signed-mail.phps b/examples/signed-mail.phps index a9c3140a1..c444b69e7 100644 --- a/examples/signed-mail.phps +++ b/examples/signed-mail.phps @@ -34,6 +34,11 @@ * openssl pkcs12 -in exported-cert.pfx -clcerts -nokeys -out cert.crt * * Again, the way you name your certificate is up to you. You will be also asked for the Import Password. + * To create the certificate-chain file use the following command: + * + * openssl pkcs12 -in exported-cert.pfx -cacerts -out certchain.pem + * + * Again, the way you name your chain file is up to you. You will be also asked for the Import Password. * * * STEP 3 - Code (most of the code is copied from the mail.phps example) @@ -64,8 +69,9 @@ $mail->addAttachment('images/phpmailer_mini.png'); //signing the email $mail->sign('/path/to/cert.crt', //the location of your certificate file '/path/to/cert.key', //the location of your private key file - 'yourSecretPrivateKeyPassword'); //the password you protected your private key with (may be empty but parameter can not mit omitted!) - //!!!! This is not the Import Password !!!! + 'yourSecretPrivateKeyPassword', //the password you protected your private key with (may be empty but parameter can not mit omitted!) + '/path/to/certchain.pem'); //the location of your chain file + //!!!! yourSecretPrivateKeyPassword is not the Import Password !!!! //send the message, check for errors if (!$mail->send()) { @@ -79,4 +85,4 @@ if (!$mail->send()) { * If your email client does not support S/MIME it will most likely just show an attachment smime.p7s which is the signature contained in the email. * Other clients, such as Thunderbird support S/MIME natively and will validate the signature automatically and report the result in some way. */ -?> \ No newline at end of file +?>