This question already has an answer here:
I have almost 40000 email address in my database record. I have build a mailing script in Laravel 5.3.*
for marketing purpose. Now I am able to send them emails by using following function in controller.
public function send_seo(){
$to = Smails::get();
foreach($to as $t)
{
$acc[] = $t->email;
}
$sendto = $acc;
Mail::send('emails.seomail', $data, function($m) use ($sendto){
$m->from('contact@devdigs.com', 'SEO SERVICES');
$m->to($sendto, '')->subject('SEO Services In Affordable Prices');
});
return 'sent';
}
Here in this code, Smail
is model witch is linked with the table where email accounts are recorded.
Now I want to run a query after every success full email and so that I will be able to store sent
or not sent
status of current email address in a different table. Is there any possibility or best solution for my required functionality.?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2fGSNDG
via IFTTT
Aucun commentaire:
Enregistrer un commentaire