public function __construct(array $emails)
{
if (count($emails) == 0) {
throw new Exception('Error: There must be at least one email address passed.');
}
foreach ($emails as $key => $value) {
if (!is_numeric($key)) {
$this->emails[] = array('name' => $key, 'email' => $value);
} else {
$this->emails[] = array('email' => $value);
}
}
}