[英]Magento Newsletter queue does not sent any email
Magento 通訊隊列不向訂閱者發送任何 email。 我在隊列中保存了通訊模板 2 天。 但是沒有發送時事通訊。 可能是什么問題呢。 在我手動運行此命令“php bin/magento cron:run”后,它會將狀態“未發送”更改為“已發送”,但訂閱者會收到任何 email。 我該如何解決? 請幫我。
請按照以下步驟操作:
1- 通過查看 cron_schedule 表檢查 Magento cron 是否正在運行。 表中列出的通訊隊列和模塊執行狀態應該有重新發送記錄。
2- Run cron service manually by pointing your browser to http://your.magento.url.here/cron.php
3- 啟用 PHP 郵件日志: http://php.net/manual/en/mail.configuration.php#ini.mail.log
4- 使用 mailq 命令檢查服務器上的外發郵件隊列
5- Try to send all mail via external mail server by installing one of the SMTP extensions: http://www.magentocommerce.com/magento-connect/smtp-pro-email-free-custom-smtp-email.html
6- 確保時事通訊消息不會出現在垃圾郵件文件夾中。
感謝您的友好回復。 現在,我可以使用 mageplaza 的 cron schedule 模塊發送 Magento 時事通訊。 Cron schdule 模塊手動運行時事通訊模板。 所以更新的訂閱者不會發送任何郵件。 我使用“crontab -e”命令在 linux 中設置了 cron 作業:
我的 Observer.php 文件如下:
<?php
/**
聲明(嚴格類型=1);
命名空間 Magento\Newsletter\Model;
使用 Magento\Newsletter\Model\ResourceModel\Queue\Collection; 使用 Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory;
/**
通訊模塊觀察者
@SuppressWarnings(PHPMD.LongVariable) / class 觀察者 { / *
/**
/**
/**
/**
/**
預定發送處理程序
@return void / public function scheduleSend() { / * @var Collection $collection */ $collection = $this->_queueCollectionFactory->create(); $collection->setPageSize(self::COUNT_OF_QUEUE)->setCurPage(self::FIRST_PAGE)->addOnlyForSendingFilter()->load();
$collection->walk('sendPerSubscriber', [self::COUNT_OF_SUBSCRIPTIONS]); } }
我想在 magento 中自動發送時事通訊。 我的文件有什么問題? 請指導我...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.