简体   繁体   English

1.9.1 Magento 通过 CC 向以前的客户发送确认电子邮件

[英]1.9.1 Magento sending confirmation emails to previous customers via CC

I have an issue with Magento 1.9.1.我对 Magento 1.9.1 有问题。 As you know, 1.9.1 is sending mails only if you put cron.php in cronjob to cpanel.如您所知,1.9.1 仅当您将 cron.php 放在 cronjob 中时才会发送邮件到 cpanel。

But as it sends out transactional emails to new customers of a new order, it is adding some previous random customer to CC.但是,当它向新订单的新客户发送交易电子邮件时,它会将一些以前的随机客户添加到 CC。

It is very annoying now, and I cannot find any solution, and I'm sure this is some Magento bug.现在很烦人,我找不到任何解决方案,而且我确定这是 Magento 的一些错误。

I ended up at core_email_queue_recipients table, that keeps the queue I think, but I'm afraid, if I truncate this table, this problem will happen again with newer customers.我最终到达了 core_email_queue_recipients 表,我认为它保留了队列,但我担心,如果我截断此表,新客户将再次发生此问题。

I made the core_email_queue_recepeints table empty, and since then everything seems to be working now... until now, and I hope it will stay this way.我将 core_email_queue_recepeints 表设为空,从那时起一切似乎都在工作......直到现在,我希望它会保持这种状态。

Anyway: The problem was caused by magento adding the same message id to another customer, too... But why, I do not know.无论如何:问题是由 magento 也向另一个客户添加相同的消息 ID 引起的......但为什么,我不知道。

The problem is that a foreign key is missing from the core_email_queue_recipients table.问题是 core_email_queue_recipients 表中缺少外键。

This is basically a magento 1.9 bug.这基本上是一个 magento 1.9 错误。

Follow the steps in the following answer, https://magento.stackexchange.com/questions/53961/new-order-email-being-sent-twice/87299#87299按照以下答案中的步骤操作, https://magento.stackexchange.com/questions/53961/new-order-email-being-sent-twice/87299#87299

most importantly is the ALTER TABLE statement and clearing the table:最重要的是 ALTER TABLE 语句和清除表:

DELETE FROM core_email_queue_recipients WHERE message_id NOT IN (SELECT message_id FROM core_email_queue);
DELETE FROM core_email_queue_recipients WHERE recipient_id < (SELECT recipient_id FROM (SELECT recipient_id FROM core_email_queue_recipients ORDER BY message_id ASC, recipient_id DESC LIMIT 1) AS r);
ALTER TABLE core_email_queue_recipients ADD FOREIGN KEY(message_id) REFERENCES core_email_queue(message_id) ON DELETE CASCADE;

Hope this helps, as it worked well for me!希望这会有所帮助,因为它对我来说效果很好!

This issue appears to be related to the cron job.此问题似乎与 cron 作业有关。 The magento emails are being sent to all customers with processing/pending orders. magento 电子邮件正在发送给所有处理/待处理订单的客户。 So if you confirm shipment on an order before your next order is made, you will not experience this issue.因此,如果您在下一个订单之前确认订单发货,您将不会遇到此问题。 I found this forum: https://magento.stackexchange.com/questions/45571/new-order-email-confirmation-not-being-sent-magento-1-9-1 .我找到了这个论坛: https : //magento.stackexchange.com/questions/45571/new-order-email-confirmation-not-being-sent-magento-1-9-1

Anybody else have a solution for this asap?有没有其他人尽快解决这个问题? Thanks for any help谢谢你的帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM