Update examples/test_smtp_gmail_advanced.php

updated to use RFC 2606 emails
This commit is contained in:
mattsturdy 2013-02-27 20:52:16 -03:00
parent a7cfc81b68
commit 2f7b3ec0f5
1 changed files with 2 additions and 4 deletions

View File

@ -3,7 +3,6 @@
<title>PHPMailer - SMTP (Gmail) advanced test</title>
</head>
<body>
<?php
require_once('../class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
@ -21,8 +20,8 @@
$mail->Port = 587; // set the SMTP port for the GMAIL server
$mail->Username = "username@gmail.com"; // GMAIL username
$mail->Password = "password"; // GMAIL password
$mail->AddAddress('matt.sturdy@gmail.com', 'John Doe');
$mail->SetFrom('matt.sturdy@gmail.com', 'First Last');
$mail->AddAddress('john.doe@example.com', 'John Doe');
$mail->SetFrom('first.last@example.com', 'First Last');
//$mail->AddReplyTo('name@yourdomain.com', 'First Last');
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
@ -37,6 +36,5 @@
echo $e->getMessage(); //Boring error messages from anything else!
}
?>
</body>
</html>