Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions PlancakeEmailParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,20 @@ public function getCc()

return explode(',', $this->rawFields['cc']);
}

/**
*
* @return array
* @throws Exception if a to header is not found or if there are no recipient
*/
public function getFrom()
{
if ( (!isset($this->rawFields['from'])) || (!count($this->rawFields['from'])))
{
throw new Exception("Couldn't find the recipients of the email");
}
return explode(',', $this->rawFields['from']);
}

/**
*
Expand Down