Magento
v1.9.1을 사용 중이며 MailGun
플러그인이 설치되어 있습니다.Magento - Mailgun 플러그인이 이메일을 보내지 않음
플러그인 URL : 여기 https://www.magentocommerce.com/magento-connect/mailgun-for-email-delivery.html
당신이 관리 영역에 MailGun
플러그인을 볼 수는 :
test_email.php
)를 전송하려면 다음 코드를 사용 :
<?php
// Invoke the Magento environment
require_once('app/Mage.php');
Mage::app();
//Getting the Store E-Mail Sender Name.
$senderName = Mage::getStoreConfig('trans_email/ident_general/name');
//Getting the Store General E-Mail.
$senderEmail = Mage::getStoreConfig('trans_email/ident_general/email');
$customerEmail = "<[email protected]_on_purpose>";
$text = "Hello, this is a test.";
//Sending E-Mail to Customers.
$mail = Mage::getModel('core/email')
->setToName($senderName)
->setToEmail($customerEmail)
->setBody($text)
->setSubject('Subject :')
->setFromEmail($senderEmail)
->setFromName($senderName)
->setType('html');
try{
//Confimation E-Mail Send
$mail->send();
}
catch(Exception $error)
{
Mage::getSingleton('core/session')->addError($error->getMessage());
return false;
}
?>
그런 다음 이메일이 나를 부에 도착합니다. 그것은 MailGun을 통해 전송되지 않습니다. 수신 이메일의 헤더에 애플리케이션이 존재하는 서버가 있고 MailGun 로그에 이메일이 기록되지 않기 때문에 나는 알고 있습니다.
필자는 MailGun 플러그인이 백엔드 관리 영역에서만 작동한다고 생각하지만 Magento와 이메일을 보낼 때 호출되지 않습니다.
die("Send stopped on file: ./app/code/community/FreeLunchLabs/MailGun/Model/Mailgun.php");
다음 줄을 추가하여 ./app/code/community/FreeLunchLabs/MailGun/Model/Mailgun.php
:
나는 또한 파일을 수정 테스트를했다
처럼 :
... public function send($message) { die("Send stopped on file: ./app/code/community/FreeLunchLabs/MailGun/Model/Mailgun.php"); $domain = $message->getStore()->getConfig('mailgun/general/domain'); $apiKey = $message->getStore()->getConfig('mailgun/general/key'); $files = null; if(count($message->getAttachments())) { foreach($message->getAttachments() as $attachment) { $files[] = $attachment; } } $sendResponse = $this->mailgunRequest('messages', $domain, $apiKey, $message->getMessage(), Zend_Http_Client::POST, false, $files); if($message->getStore()->getConfig('mailgun/events/store')) { Mage::getModel('freelunchlabs_mailgun/email')->saveInitialSend($message, $sendResponse); } return $sendResponse; } ...
그러나 파일을 실행하는 경우 :,, 위의 코드에서
die(...)
안에있는stopped message
이 나타나지 않습니다.해결 방법/디버깅 방법에 대한 아이디어가 있으십니까?
오류 로그 확인 – urfusion
위와 같은 경우 ("die"inside : "send"줄을 지우면서) 전자 메일 시스템에서 구독과 같은 Magento 공식 전자 메일을 테스트하고 계정을 만든 다음 이메일이 Mailgun을 통해 올바르게 전송 된 경우. 그러나 첫 번째 코드 인 "test_email.php"로 사용자 정의 전자 메일을 보내면 전자 메일은 MailGun을 통해 전송되지 않고 기본 smtp 릴레이를 통해 전송됩니다. 맞춤 이메일에서 MailGun을 사용하는 방법에 대한 아이디어가 있습니까? – Angel