src/Mailtrap.php
protected function getOpenedEmail($fetchNextUnread = FALSE)
  {
    if($fetchNextUnread || $this->openedEmail == NULL)
    {
      $this->openNextUnreadEmail();
    }

    return $this->openedEmail;
  }
protected function getOpenedEmail($fetchNextUnread = FALSE)
  {
    if($fetchNextUnread || $this->openedEmail == NULL)
    {
      $this->openNextUnreadEmail();
    }

    return $this->openedEmail;
  }
Get Opened Email

Main method called by the tests, providing either the currently open email or the next unread one

@param bool $fetchNextUnread Goes to the next Unread Email
@return mixed Returns a JSON encoded Email