1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- require '../PHPMailerAutoload.php';
- $mail = new PHPMailer();
- $mail->setFrom('from@example.com', 'First Last');
- $mail->addReplyTo('replyto@example.com', 'First Last');
- $mail->addAddress('whoto@example.com', 'John Doe');
- $mail->Subject = 'PHPMailer mail() test';
- $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
- $mail->AltBody = 'This is a plain-text message body';
- $mail->addAttachment('images/phpmailer_mini.png');
- $mail->sign(
- '/path/to/cert.crt',
- '/path/to/cert.key',
- 'yourSecretPrivateKeyPassword',
- '/path/to/certchain.pem'
- );
- if (!$mail->send()) {
- echo "Mailer Error: " . $mail->ErrorInfo;
- } else {
- echo "Message sent!";
- }
- ?>
|