I’m planning to send a Mail to multiple receipts and also different cc and bcc. However, seems like this function is not correct working? Also with this example:
ONE Mail is sended, but not two! Of course the two E-Mail Addresses appear in the E-Mail, but they are technically not sended. Any ideas why?
Have you already tested from a remote server? If not, I recommend testing that.
Sending email from localhost and even your remote server is very unreliable. Often, the mails arrive much later or end up in the spam folder if they arrive at all.
It is absolutely recommendable to send your mails through a service.
Edit: I googled a bit to find a way to debug what is happening. If you are on a Mac, you can start logging using this line in terminal:
This starts a log stream. Now once you start sending mail via SMTP, you can watch this stream to see what is happening, for example if your IP is blacklisted etc.
There are probably other ways to debug this but it works.