I need to build a small app/page that will select all users from the database then within a text area add some text and email all the users at the same time, how is the best way to do this?
Ok get that, but I want to jut call from my controller something like User::all(); pass that the mail function like you stated but how can that be done?
Basically I have a textarea that allows the admin to add some text etc then they will click send and that needs to pass that throw to the view as $data then send this to everyone in the Users table.
@lstables@ZetecVan Yeah, that might be the case, i'm not sure? Don't you have to put recipient and multiple CC recipients to be able to se who else it has been send to?
Else you're forced to do a simple foreach loop - Sending to one at the time?
Okay @lstables@ZetecVan - after a swift Google search, it seems that it sends them out one at the time unless you specify it to don't do it - so it should work? I would do a quick test to see if that's the case?
Ok that works, but does show all emails in the to field in my email client.
So obviously I don't want this, what do I need to in order to stop that? A loop? If so how?
Note: Bulk sending requires unchecking option "Expose The List Of Recipients When Sending To Multiple Addresses" under "Sending options" in Mandrill account. Otherwise all addresses in TO field will be exposed to all recipients.