任何人都可以提供有关如何使用OctoberCMS ajax页面对电子邮件进行排队的提示的提示吗?
<div class="flex-container">
<div class="row">
<div class="flex-item">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div>
<div class="flex-item">where</div>
<div class="flex-item">I</div>
<div class="flex-item">am?</div>
</div>
</div>
当我们使用Mail :: send但不使用Mail :: queue时,此代码有效
非常欢迎任何帮助或提示
答案 0 :(得分:1)
在您的config/queue.php
文件中,您将哪个驱动程序设置为默认驱动程序?
例如:'default' => env('QUEUE_DRIVER', 'sync')
(如果您使用的是DotEnv,请检查docroot中的.env
文件)。
如果您正在使用同步,它应该立即发送,因为同步实际上仅适用于development,并且仍然会阻塞。
如果您正在使用另一种方法(例如数据库),则必须ensure that your queues are configured to process how you expect。
尝试运行php artisan queue:work
,然后触发您的ajax调用,它应该发送。