Skip to content

Commit b6f421c

Browse files
committed
Clean up
1 parent d6d7a8d commit b6f421c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

examples/signed-mail.phps

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* Again, the way you name your chain file is up to you. You will be also asked for the Import Password.
4242
*
4343
*
44-
* STEP 3 - Code (most of the code is copied from the mail.phps example)
44+
* STEP 3 - Code
4545
*/
4646

4747
require '../PHPMailerAutoload.php';
@@ -59,21 +59,22 @@ $mail->addAddress('[email protected]', 'John Doe');
5959
//Set the subject line
6060
$mail->Subject = 'PHPMailer mail() test';
6161
//Read an HTML message body from an external file, convert referenced images to embedded,
62-
//convert HTML into a basic plain-text alternative body
62+
//Convert HTML into a basic plain-text alternative body
6363
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
6464
//Replace the plain text body with one created manually
6565
$mail->AltBody = 'This is a plain-text message body';
6666
//Attach an image file
6767
$mail->addAttachment('images/phpmailer_mini.png');
6868

69-
//signing the email
70-
$mail->sign('/path/to/cert.crt', //the location of your certificate file
71-
'/path/to/cert.key', //the location of your private key file
72-
'yourSecretPrivateKeyPassword', //the password you protected your private key with (may be empty but parameter can not mit omitted!)
73-
'/path/to/certchain.pem'); //the location of your chain file
74-
//!!!! yourSecretPrivateKeyPassword is not the Import Password !!!!
69+
//Configure message signing (the actual signing does not occur until sending)
70+
$mail->sign(
71+
'/path/to/cert.crt', //The location of your certificate file
72+
'/path/to/cert.key', //The location of your private key file
73+
'yourSecretPrivateKeyPassword', //The password you protected your private key with (not the Import Password! may be empty but parameter must not be omitted!)
74+
'/path/to/certchain.pem' //The location of your chain file
75+
);
7576

76-
//send the message, check for errors
77+
//Send the message, check for errors
7778
if (!$mail->send()) {
7879
echo "Mailer Error: " . $mail->ErrorInfo;
7980
} else {

0 commit comments

Comments
 (0)