Skip to content

Commit c238366

Browse files
committed
Fixes
1 parent 4e8a9ff commit c238366

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mailer.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,12 @@ hide its contents::
571571
// ...
572572
->html('...');
573573

574-
// if the certificate has a passphrase, pass it as the third argument
575-
// new SMimeSigner('/path/to/certificate.crt', '/path/to/certificate-private-key.key', 'the-passphrase');
576574
$signer = new SMimeSigner('/path/to/certificate.crt', '/path/to/certificate-private-key.key');
577-
// now use the Mailer component to send this $signedEmail instead of the original email
575+
// if the private key has a passphrase, pass it as the third argument
576+
// new SMimeSigner('/path/to/certificate.crt', '/path/to/certificate-private-key.key', 'the-passphrase');
577+
578578
$signedEmail = $signer->sign($email);
579+
// now use the Mailer component to send this $signedEmail instead of the original email
579580

580581
The certificate and private key must be `PEM encoded`_, and can be either
581582
created using for example OpenSSL or obtained at an official Certificate
@@ -609,8 +610,8 @@ corresponding private key can read the original message contents::
609610
->html('...');
610611

611612
$encrypter = new SMimeEncrypter('/path/to/certificate.crt');
612-
// now use the Mailer component to send this $encryptedEmail instead of the original email
613613
$encryptedEmail = $encrypter->encrypt($email);
614+
// now use the Mailer component to send this $encryptedEmail instead of the original email
614615

615616
You can pass more than one certificate to the ``SMimeEncrypter()`` constructor
616617
and it will select the appropriate certificate depending on the ``To`` option::

0 commit comments

Comments
 (0)