Skip to content

paulbunyannet/mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paulbunyannet/mail

Build Status Latest Version

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);
}

About

Get Mail from POP or IMAP server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages