File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -571,11 +571,12 @@ hide its contents::
571
571
// ...
572
572
->html('...');
573
573
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');
576
574
$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
+
578
578
$signedEmail = $signer->sign($email);
579
+ // now use the Mailer component to send this $signedEmail instead of the original email
579
580
580
581
The certificate and private key must be `PEM encoded `_, and can be either
581
582
created using for example OpenSSL or obtained at an official Certificate
@@ -609,8 +610,8 @@ corresponding private key can read the original message contents::
609
610
->html('...');
610
611
611
612
$encrypter = new SMimeEncrypter('/path/to/certificate.crt');
612
- // now use the Mailer component to send this $encryptedEmail instead of the original email
613
613
$encryptedEmail = $encrypter->encrypt($email);
614
+ // now use the Mailer component to send this $encryptedEmail instead of the original email
614
615
615
616
You can pass more than one certificate to the ``SMimeEncrypter() `` constructor
616
617
and it will select the appropriate certificate depending on the ``To `` option::
You can’t perform that action at this time.
0 commit comments