PHPMailer:Amazon SES返回“554交易失败:无效的电子邮件地址未披露的收件人:;”。

When using PHPMailer to send email to BCC'd addresses via Amazon SES, SES returns the error below.

554 Transaction failed: Invalid email address undisclosed-recipients:;.

This only happens when there is no address specified in the "To" field and it is filled with "Undisclosed-recipients:;". I have tried sending email with just an address specified in the "To" field and it works fine. When sending email with an address in the "To" field and addresses that are BCC'd, it also works without error.

This is the PHP code i'm using to add each email address as a BCC, $Addresses is an array containing email addresses, without keys.

    if(is_array($Addresses))
    {

        foreach ($Addresses as $Email) {
            $Mail->AddBCC($Email);
        }

    }

This is the output from PHPMailer.

Invalid address: Noreply
CLIENT -> SMTP: MAIL FROM:<*redacted*>
SMTP -> FROM SERVER:250 Ok
CLIENT -> SMTP: RCPT TO:<*redacted, bcc'd address*>
SMTP -> FROM SERVER:250 Ok
CLIENT -> SMTP: RCPT TO:<*redacted, bcc'd address*>
SMTP -> FROM SERVER:250 Ok
CLIENT -> SMTP: DATA
SMTP -> FROM SERVER:354 End data with <CR><LF>.<CR><LF>
CLIENT -> SMTP: Date: Mon, 12 Aug 2013 20:46:09 +0000
CLIENT -> SMTP: Return-Path: <*redacted*>
CLIENT -> SMTP: To: undisclosed-recipients:;
CLIENT -> SMTP: From: Noreply <*redacted*>
CLIENT -> SMTP: Subject: *redacted*
CLIENT -> SMTP: Message-ID: <*redacted*>
CLIENT -> SMTP: X-Priority: 3
CLIENT -> SMTP: X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/)
CLIENT -> SMTP: MIME-Version: 1.0
CLIENT -> SMTP: Content-Type: text/html; charset=iso-8859-1
CLIENT -> SMTP: Content-Transfer-Encoding: 8bit
CLIENT -> SMTP: 
CLIENT -> SMTP: *redacted*
CLIENT -> SMTP: 
CLIENT -> SMTP: .
SMTP -> FROM SERVER:554 Transaction failed: Invalid email address undisclosed-recipients:;.
SMTP -> ERROR: DATA not accepted from server: 554 Transaction failed: Invalid email address undisclosed-recipients:;.
SMTP Error: Data not accepted.
CLIENT -> SMTP: quit
SMTP -> FROM SERVER:221 Bye
string(126) "SMTP Error: Data not accepted.
SMTP server error: Transaction failed: Invalid email address undisclosed-recipients:;.

I have also found that a few people get this error when using Postfix with SES, but I am yet to find how they resolved the issue.

I've seen this happen if an email in the 'BCC' matches an email in the 'TO' field.