Swiftmailer没有立即发送 [英] Swiftmailer not sending immediately

查看:98
本文介绍了Swiftmailer没有立即发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成功配置我的symfony网络应用程序以使用SMTP发送电子邮件。但是我所有发送的电子邮件都被放入 spool 目录。

I have successfully configure my symfony webapp to sending email using SMTP. But all my sending email are being put into the spool directory.

只有在发送错误时才会发生。

This should only occurs whem there is an error in the sending. Is that correct?

但是如果我执行命令 swiftmailer:spool:send --env = prod ,则全部正确吗?我的电子邮件发送正确。

But if I execute the command swiftmailer:spool:send --env=prod, all my emails are sending correctly.

为什么我的服务器没有立即发送电子邮件?
是因为我修复了错误吗?有什么办法解决这个问题?

Why my server are not sending the email immediately? Is that because I fixed an error? Is there any way to fix this?

swiftmailer:

swiftmailer:

spool:
    type: file
    path: %kernel.root_dir%/spool


推荐答案

只需将命令 swiftmailer:spool:send 添加到 crontab 中。 Symfony文档

A just add the command swiftmailer:spool:send into crontab. This step wasn't clear on Symfony documentation.

这篇关于Swiftmailer没有立即发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆