paulbunyannet / mail
Get message from mail box
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/paulbunyannet/mail
Requires
- php: >=5.4.0
Requires (Dev)
- fzaninotto/faker: ^1.5
- phpunit/phpunit: ^4.8
- swiftmailer/swiftmailer: ^5.4
This package is auto-updated.
Last update: 2025-09-23 04:29:15 UTC
README
paulbunyannet/mail Shortcut for checking a mail box
Installation
This project can be installed via [Composer]:
$ composer require paulbunyannet/mail:"^1.0"
Get Mail
$mailbox = new Pbc\Mail\GetMail([ 'username' => emailUsername, 'password' => emailPassword, 'email' => someone@email.com, 'mailServer' => mail.email.com, ]); // get total messages in box $totalMail = $mailbox->getTotalMails(); for ($i = 1; $i <= $totalMail; $i++) { $headers = $mailbox->getHeaders($i); echo "<h1>" . $headers['subject'] . '</h1>'; echo "<p>From: " . $headers['from'] . '</p>'; echo $mailbox->getFullBody($i); }