The SMTP server that you use has a limit. You sent too much mails in a short time and reached that limit and therefore you got this response. I can't tell you what the exact limit is but for bulk promotional emails you should use sendgrind, mailchimp or a similar service. You can also use your own SMTP server but there's a big chance that your servers IP will get blocked when too much of the mails get marked as spam.
May 6, 2024
1
Level 1
Expected response code "250" but got code "421", with message "421 too many messages in this connection".
I developed a website intended for sending promotional bulk emails. It's hosted on GoDaddy servers. I experimented with various email delivery methods like Gmail SMTP, webmail, and Outlook. However, I encountered an issue after sending just 10 emails. The error message displayed was: "Expected response code '250' but received code '421', with the message '421 too many messages in this connection" this is my code
public function promotionMail(Request $request){
$enquiries = DB::table('emails')->get();
/*$enquiries = Registermail::where('is_active',1)->get();*/
// Retrieve recipient emails or other necessary data
$recipients = $enquiries->pluck('email');// Example recipients
$input=$request->all();
// Dispatch job to send emails
ini_set('max_execution_time', 4500);
dispatch(new SendBulkEmails($recipients,$input));
// Optionally, return a response or redirect
return redirect()->back()->with('success', 'Bulk emails are being sent.');
}
how to solve this if anyone have any idea please share.
Please or to participate in this conversation.