diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php index e5445b0abf..e583e508b5 100644 --- a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php +++ b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php @@ -96,6 +96,15 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO { } public function addRawTos(array $raw_email) { + + // Strip addresses down to bare emails, since the MailAdapter API currently + // requires we pass it just the address (like `alincoln@logcabin.org`), not + // a full string like `"Abraham Lincoln" `. + foreach ($raw_email as $key => $email) { + $object = new PhutilEmailAddress($email); + $raw_email[$key] = $object->getAddress(); + } + $this->setParam('raw-to', $raw_email); return $this; }