【发布时间】:2020-01-06 08:36:31
【问题描述】:
我正在尝试发送多封电子邮件,但它返回此类错误:
预期响应代码为 354,但得到代码“550”,消息为“550 5.7.0” 未采取请求的操作:每秒发送的电子邮件过多”
代码
$reciverss = array_merge($admins, $workers); // finalizing my queries and joining two arrays in one
// getting input data
$details = array(
'body' => $request->input('body'),
'subject' => $request->input('subject'),
);
// getting receivers email addresses from my merged array and try to send input data to them as email
foreach($reciverss as $receive){
Mail::to($receive->email)->send(new PICMAIL($details));
}
更多
我的$rereciverss 数据如下所示:
[{email: "admin@admin.com", username: "admin", userId: 1},…]
0: {email: "admin@admin.com", username: "admin", userId: 1}
1: {email: "employee@employee.com", username: "employee", userId: 2}
2: {email: "non-employee@employee.com", username: "non employee", userId: 3}
基本上我需要发送电子邮件给他们发送电子邮件,但它返回我上面提到的错误。
有什么想法吗?
【问题讨论】: