Skip to content

Commit b731bd2

Browse files
committed
Fixed the first argument of DkimSigner
1 parent c0d4b2c commit b731bd2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mailer.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -641,12 +641,13 @@ key but not a certificate::
641641
// ...
642642
->html('...');
643643

644-
// first argument: string with the contents or the absolute path of the private key
644+
// first argument: same as openssl_pkey_get_private(), either a string with the
645+
// contents of the private key or the absolute path to it (prefixed with 'file://')
645646
// second and third arguments: the domain name and "selector" used to perform a DNS lookup
646647
// (the selector is a string used to point to a specific DKIM public key record in your DNS)
647-
$signer = new DkimSigner('/path/to/private-key.key', 'example.com', 'sf');
648+
$signer = new DkimSigner('file:///path/to/private-key.key', 'example.com', 'sf');
648649
// if the private key has a passphrase, pass it as the fourth argument
649-
// new DkimSigner('/path/to/private-key.key', 'example.com', 'sf', [], 'the-passphrase');
650+
// new DkimSigner('file:///path/to/private-key.key', 'example.com', 'sf', [], 'the-passphrase');
650651

651652
$signedEmail = $signer->sign($email);
652653
// now use the Mailer component to send this $signedEmail instead of the original email

0 commit comments

Comments
 (0)