mercredi 9 mars 2016

Sending multiple mail issue with laravel 5

I have users database, and I want to send email to all my one form So I am trying like this:

$d=Mail::send('admin.email_template', $data, function ($message) use ($data,$emailIds) {

        $message->from('dinesh224401@gmail.com', 'Dinesh Laravel');

        $message->to($emailIds)->subject($data['subject']);

    });

where $emailIds have 'dinesh.rkgit@rediffmail.com', 'anu.rkgit@rediffmail.com' but I am getting this error:

Address in mailbox given ['abc1@rediffmail.com', 'abc@rediffmail.com'] does not comply with RFC 2822, 3.6.2.

if I user directly emails in mail function like this:

$message->to('abc1@rediffmail.com', 'abc@rediffmail.com')

then it works, I do not know what is problem, Thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire