Bogardo / Mailgun

Mailgun package for Laravel
MIT License
295 stars 115 forks source link

Example send email to mailing list #143

Closed shiroamada closed 6 years ago

shiroamada commented 6 years ago

Hi,

Can you add example send to send email to mailing list email. I create a mailing list in mailgun. my_first_list@example.com (this is just for mail listing, in my mail server it does not exist).

I added 2 emails (outside from this mailgun domain) in this mailing list.

And I send out

Mailgun::send("welcome", [], function ($message) {
    $message
        ->subject('Example Newsletter')
        ->to('my_first_list@example.com', 'My First Mailing List');
});

In mailgun log, it show accept and success. But my two emails did not receive any email.

Anything I missed? I suspect it is something do with my domain?

shiroamada commented 6 years ago

OK, I found the issue. It is due to I did not set the MX record in my DNS. In order for the mailing list work, it has to do with the MX Record.

So what I had done was create a subdomain and added MX record. My primary domain is used by other mail provider so I can't set it.