Created
March 8, 2015 13:04
-
-
Save pstuifzand/6ff46ced1b09cea8e2f2 to your computer and use it in GitHub Desktop.
Use Magento (Zend_Mail) with Mailcatcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Test_Test_Model_Observer { | |
public function _construct() {} | |
public function fixEmailConfig($observer) { | |
if (Mage::getStoreConfigFlag('dev/email/enabled')) { | |
$ip = $_SERVER["REMOTE_ADDR"]; | |
$config = array('port' => '1025'); | |
$tr = new Zend_Mail_Transport_Smtp($ip, $config); | |
Zend_Mail::setDefaultTransport($tr); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment