src/Mailtrap.php
protected function getMostRecentUnreadEmail()
  {
    if(empty($this->unreadInbox))
    {
      $this->fail('Unread Inbox is Empty');
    }

    $email = array_shift($this->unreadInbox);
    $content = $this->getFullEmail($email->id);
    $content->Headers = $this->getHeaders($email->id)->headers;
    return $content;
  }
protected function getMostRecentUnreadEmail()
  {
    if(empty($this->unreadInbox))
    {
      $this->fail('Unread Inbox is Empty');
    }

    $email = array_shift($this->unreadInbox);
    $content = $this->getFullEmail($email->id);
    $content->Headers = $this->getHeaders($email->id)->headers;
    return $content;
  }
protected function getMostRecentUnreadEmail ( ) { if ( empty ( $ this -> unreadInbox ) ) { $ this -> fail ( 'Unread Inbox is Empty' ) ; } $ email = array_shift ( $ this -> unreadInbox ) ; $ content = $ this -> getFullEmail ( $ email -> id ) ; $ content -> Headers = $ this -> getHeaders ( $ email -> id ) -> headers ; return $ content ; }
Get Most Recent Unread Email

Pops the most recent unread email, fails if the inbox is empty

@return mixed Returns a JSON encoded Email
Get Most Recent Unread Email