phpmailjet

Unable to E-mail Multiple BCC Addresses Using Mailjet PHP Wrapper


I'm using the Mailjet PHP Wrapper. https://github.com/mailjet/mailjet-apiv3-php-simple

For the to parameter you can supply an array of e-mail addresses and it works. But I need to send them as bcc. But when I change to to bcc nothing sends.

How do I send multiple bcc's???

Their API says cc and bcc are valid params: http://dev.mailjet.com/guides/send-api-guide/


Solution

  • You can't just replace to by bcc to send your array of emails by bcc.

    To have an email sent, you need at least to have one email in to and then you'll be able to have your bcc array.

    to is a mandatory field : http://dev.mailjet.com/guides/send-api-guide/

    EDIT : I just pushed a modification to handle this case : if there is no to but ccor bccare not empty, I set toto mailjet@example.org. Tell me if everything is fine now.