-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #12
- Loading branch information
Showing
18 changed files
with
284 additions
and
18 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
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
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace PeeHaa\MailGrab\Examples; | ||
|
||
use PHPMailer\PHPMailer\PHPMailer; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$mail = new PHPMailer(); | ||
|
||
$mail->isSMTP(); | ||
$mail->Host = 'localhost'; | ||
$mail->Port = 9025; | ||
$mail->SMTPDebug = true; | ||
|
||
$mail->setFrom('from@example.com', 'Mailer'); | ||
$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient | ||
$mail->addAddress('ellen@example.com'); // Name is optional | ||
$mail->addReplyTo('info@example.com', 'Information'); | ||
$mail->addCC('cc@example.com'); | ||
$mail->addBCC('bcc@example.com'); | ||
|
||
$mail->Subject = 'PHPMailer'; | ||
$mail->Body = 'This is the HTML message body <b>in bold!</b>'; | ||
$mail->isHTML(true); | ||
|
||
if(!$mail->send()) { | ||
echo 'Message could not be sent.'; | ||
echo 'Mailer Error: ' . $mail->ErrorInfo; | ||
} else { | ||
echo 'Message has been sent'; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Date: Wed, 25 Apr 2018 11:17:15 +0000 | ||
To: Joe User <joe@example.net>, ellen@example.com | ||
From: Mailer <from@example.com> | ||
Cc: cc@example.com | ||
Reply-To: Information <info@example.com> | ||
Subject: PHPMailer | ||
Message-ID: <OVhuBTY99dkKuu9hS0cwCe61FCanC1muNDwFvjlloo@MSIGL72M7RDX> | ||
X-Mailer: PHPMailer 6.0.5 (https://github.com/PHPMailer/PHPMailer) | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=iso-8859-1 | ||
|
||
This is the body in plain text for non-HTML mail clients | ||
|
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Date: Wed, 25 Apr 2018 11:19:17 +0000 | ||
To: Joe User <joe@example.net>, ellen@example.com | ||
From: Mailer <from@example.com> | ||
Cc: cc@example.com | ||
Reply-To: Information <info@example.com> | ||
Subject: PHPMailer | ||
Message-ID: <hdAeYRzbi244B3xgZoWqHfUX4j4ASbsXy64Me59GMQw@MSIGL72M7RDX> | ||
X-Mailer: PHPMailer 6.0.5 (https://github.com/PHPMailer/PHPMailer) | ||
MIME-Version: 1.0 | ||
Content-Type: text/html; charset=iso-8859-1 | ||
|
||
This is the HTML message body <b>in bold!</b> | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Date: Wed, 25 Apr 2018 11:03:06 +0000 | ||
To: Joe User <joe@example.net>, ellen@example.com | ||
From: Mailer <from@example.com> | ||
Cc: cc@example.com | ||
Reply-To: Information <info@example.com> | ||
Subject: PHPMailer | ||
Message-ID: <nCtDvEpXde2mSWDlbWR7CesiB3a9w8iG45OTrAWdLMo@MSIGL72M7RDX> | ||
X-Mailer: PHPMailer 6.0.5 (https://github.com/PHPMailer/PHPMailer) | ||
MIME-Version: 1.0 | ||
Content-Type: multipart/alternative; | ||
boundary="b1_nCtDvEpXde2mSWDlbWR7CesiB3a9w8iG45OTrAWdLMo" | ||
Content-Transfer-Encoding: 8bit | ||
|
||
This is a multi-part message in MIME format. | ||
--b1_nCtDvEpXde2mSWDlbWR7CesiB3a9w8iG45OTrAWdLMo | ||
Content-Type: text/plain; charset=us-ascii | ||
|
||
This is the body in plain text for non-HTML mail clients | ||
|
||
--b1_nCtDvEpXde2mSWDlbWR7CesiB3a9w8iG45OTrAWdLMo | ||
Content-Type: text/html; charset=us-ascii | ||
|
||
This is the HTML message body <b>in bold!</b> | ||
|
||
|
||
--b1_nCtDvEpXde2mSWDlbWR7CesiB3a9w8iG45OTrAWdLMo-- | ||
|
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
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
Oops, something went wrong.