I'm building an application sending out notification emails to users every 3~4 months. I'm currently using Mail queue.
// foreach user
// generate a custom message for this user
Mail::to( $mail_to )->queue( new CustomMail( $subject, $custom_message ) );
// return to success page
However, I have a few concerns with this:
Would it cause a serious CPU / RAM usage and possible crash the server? I'm currently using Digital Ocean - 2 vCPUs 4GB / 80GB Disk
If Mail::queue crashes, the rest won't be running. I will prevent it by having try and catch... but is there a better way?
It doesn't leave any logs... how do you do log and check if every email is successfully sent out?
I know there are some third party API solutions for this... do you have any other better solutions than relying on laravel?
I'm currently using Sendgrid for sending out emails.
Deliverability is the main problem and you are probably best sending the emails as slowly as you can to avoid any limits being tripped (eg apple see a bunch of emails from you, all the same within a few minutes, then they are likely to flag the sender (your server) as a spammer)