Are you sure that the mail provider allows sending 200 messages all at once like that? There is a good whoever host that mail server (comcast?) wont allow that.
Sending Bulk Emails.
I'm sending bulk email from my app which is less than 200 using queue.
Some emails are sending some are not. And inspecting it from the failed_jobs table.
And the error is stream_socket_client(): unable to connect to ssl://mail.light.org.ph:465 (Connection refused) in
Thanks for the answer.
I created that email from my other server which is from hostgator. In my local machine it works but not on production
@pings12 heres your issue:
There is a limit to emails that you can send out each day. This is to control potential spammers and prevent abuse while maintaining server balance and integrity of the email host. If there is no HostGator email sending limits then you’d receive hundreds of messages each day and that’s just overwhelming. Each email hosting site has different rules and sending limits. Once you reach the number of HostGator email sending limits you won’t be able to send more emails in that day. You can continue sending emails the next hour/day.
Limitations : 500 emails per hour
Frequency : 115 emails / 15 minutes
Comments : Use third party SMTP for list over 5000 emails
https://www.emailshoot.com/blog/hostgator-email-sending-limits/
I doubt if its the email limit. Because it is working on my local machine. If the email limit, then the error should appear on my local machine.
@pings12 the internet is not always reliable, i.e. if for some reason, your local machine or server loses network connection, jobs will fail and end up in failed_jobs table.
My approach would be to retry these failed jobs before eventually removing them. This will also deal with any email limits that are imposed by the provider.
I would add an expiry timestamp into each job, and use it to remove them from failed_jobs instead of retrying, e.g. try to send an email for up to 1 week then give up. These removals will also be logged somewhere so that we know which mails were not sent.
Laravel has built in ways to retry jobs, but you can certainly customize like the way I described above. https://laravel.com/docs/8.x/queues#dealing-with-failed-jobs
Need to send bulk emails? Try SMTPmart or Mailgun. They’re easy to use and work great!
Some of the best SMTP server providers are SMTPget, SendGrid, iDealSMTP, Amazon SES, Postmark, Mailgun, Gmail SMTP and SparkPost.
Sending Bulk Emails (Safely) Use proper SMTP (like SMTPwire, Sendgrid, DedicatedSMTPServer)
Authenticate domain – SPF, DKIM, DMARC
Warm up IP – gradually increase volume
Clean email list – no invalid emails
Use tools – MailWizz, Acelle, etc.
Follow rules – add unsubscribe, avoid spam words
👉 Done right = better inboxing, more results.
Please or to participate in this conversation.