forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update examples/test_smtp_gmail_basic.php
update to use RFC 2606 email addresses
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,18 +30,18 @@ | |
$mail->Username = "[email protected]"; // GMAIL username | ||
$mail->Password = "yourpassword"; // GMAIL password | ||
|
||
$mail->SetFrom('name@yourdomain.com', 'First Last'); | ||
$mail->SetFrom('sender@example.com', 'First Last'); | ||
|
||
$mail->AddReplyTo("name@yourdomain.com","First Last"); | ||
$mail->AddReplyTo("reply-to@example.com","First Last"); | ||
|
||
$mail->Subject = "PHPMailer Test Subject via smtp (Gmail), basic"; | ||
|
||
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test | ||
|
||
$mail->MsgHTML($body); | ||
|
||
$address = "whoto@otherdomain.com"; | ||
$mail->AddAddress($address, "John Doe"); | ||
$address = "recipient@example.com"; | ||
$mail->AddAddress($address, "Recipient Name"); | ||
|
||
$mail->AddAttachment("images/phpmailer.gif"); // attachment | ||
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment | ||
|