提问人:Bhagchandani 提问时间:3/29/2023 最后编辑:Bhagchandani 更新时间:3/30/2023 访问量:25
Symfony假脱机电子邮件正在发送有限的电子邮件
Symfony spool emails are sending limited email
问:
我是Symfony框架的新手。我的项目有 Symfony 2.8,它运行在 PHP 5.5 上。有一项功能,我们必须发送带有附件的电子邮件。客户应该收到超过 15 封电子邮件,但始终只收到 4 封电子邮件。它是否与假脱机内存有关,或者我们必须增加服务器内存?我试图打印 的响应,但它总是返回 1。以下是函数的代码:$this->get('mailer')->send($message)
$em = $this->getDoctrine()->getManager();
$currentUrl = $request->getHost();
//To Send the report to user name list that should recieve emails
$this->generateUserReport($request);
$sql = "select user, name from table;";
$stmt = $em->getConnection()->prepare($sql);
$stmt->execute();
$ApiUsers = $stmt->fetchAll();
//API Usage Reports
if (count($ApiUsers) > 0) {
foreach ($ApiUsers as $ApiUser) {
//This run multiple time
$attachments = [];
$attachment = $this->generateCSV($em, "data1", "data2", $user);
if ($attachment != "") {
$attachments[] = $attachment;
}
if (count($attachments) > 0) {
$this->sendemail("", "Admin", "apireport", "API Report" , $request, "[email protected]", $attachments, $user,"yes");
// die("testing for");
}
}
}
我们已经检查了服务器日志,但没有错误。如果重复该问题,我将删除该问题。请分享重复的。
答: 暂无答案
评论