Answer the question
In order to leave comments, you need to log in
What can be wrong with Magento not sending emails via SMTP?
Hello. I've been facing a problem for a long time that I still can't find a solution to.
Magento had the SMTP Pro Email add-on installed and it worked without issue. One fine day, users were unable to receive a confirmation email. The most interesting thing is that no one touched the site, except for adding a product. Well, system emails do not go away, although the verification email comes without problems, but the plugin throws an error:
SMTP Pro Self Test Results
Sending test email to your contact form address: [email protected] from: [email protected]
Test email was sent successfully.
Default templates exist.
Email communications are enabled.
Required database tables exist.
Testing failed, please review the reported problems and if you need further help visit the support page or contact me via [email protected] for support.
Answer the question
In order to leave comments, you need to log in
Mail worked after removing the module
app/etc/modules/Rugento_Payment.xml
app/etc/modules/Rugento_Invoicebank.xml
I'm talking to developers. Oh, there is a debug in the plugin that will solve all your problems.
You need to add the lines to the file Aschroder_SMTPPro_Model_Email_Template
$mail = $this->getMail();
/*************************Добавить ***********************************/
try {
if(isset($variables['order'])) {
$instance = $variables['order']->getPayment()->getMethodInstance();
if($instance->getCheckOrder($variables['order'])) {
$attachments = $instance->getNewOrderAttachment(); //получаем вложения из метода оплаты
if(is_array($attachments)) {
foreach ($attachments as $attachment) {
if(!$attachment instanceof Zend_Mime_Part) continue; // если не наш метод, не загружаем
$mail->addAttachment($attachment);
}
}
}
}
} catch (Exception $e) {
Mage::logException($e);
}
/**************************END добавить*******************************/
if ($returnPathEmail !== null) {
<core>
<rewrite>
<email_template>Rugento_Invoicebank_Model_Core_Email_Template</email_template>
</rewrite>
</core>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question