a2design-inc/sendgrid-webapi-cakephp-plugin

to is double in x-smtpapi

Opened this issue · 1 comments

if you just have a to as "no@spam.com"

the _getAddress function returns
0 => 'no@spam.com no@spam.com',

it should just return:
0 => 'no@spam.com',

fixed by changing:
$output[] = "$value <{$key}>";
into:
if ($key == $value) {
$output[] = "<$key>";
} else {
$output[] = "$value <{$key}>";
}