Magento Store - Don't Send Newsletter Success Email [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
开发者_运维技巧 Improve this questionWhen users subscribe to the newsletter on A Magento Store they receive a confirmation email. Is it possible to prevent this email from being sent?
There doesn't seem to be an option in the back end for this.
The file you want to override is Mage_Newsletter_Model_Subscriber
. Create a class that overrides that model, and then replace two methods like this:
<?php
class Somepackage_Somemodule_Models_Subscriber extends Mage_Newsletter_Model_Subscriber {
public function sendConfirmationSuccessEmail() {
return $this;
}
public function sendUnsubscriptionEmail() {
return $this;
}
}
This will disable newsletter subscription (and unsubscription) emails to customers.
Hope that helps!
Thanks, Joe
I made a module that solves this, and can be enabled and disabled from the backend.
Module configuration screenshot
Download the module
For disabling any email notification in Magento you can use my free extension for Magento 1.
Also, there is similar extension for Magento 2.
Do you mean success or confirmation (need to confirm to get newsletter) email?
The latter can be switched off in Configuration->Newsletter
A much easier way, although it is kind of a hack, is to look for the method sendConfirmationSuccessEmail which sends the emails. It is found in:
app/code/core/Mage/Newsletter/Model/Subscriber.php
The only thing you gotta do is to put a return true at the first line of the method.
in 1.6.2, go to app/code/core/Mage/Newsletter/Model/Subscriber.php
comment out both instances of:
`$this->sendConfirmationSuccessEmail();`
(line 358 and 457)
精彩评论