Created
August 6, 2014 15:37
-
-
Save tegansnyder/a181359f15107a976efd to your computer and use it in GitHub Desktop.
email testing SMTP outbound relay on Magento
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 | |
/** | |
* email-tester.php | |
* A tool to test if the SMTP relay is working | |
* | |
* @category Mmm | |
* @package EmailTester | |
* @author Tegan Snyder | |
* | |
*/ | |
require_once('app/Mage.php'); | |
umask(0); | |
Mage::app(); | |
$from_email = Mage::getStoreConfig('trans_email/ident_general/email'); | |
$from_name = Mage::getStoreConfig('trans_email/ident_general/name'); | |
$to_email = 'tsnyder@tegdesign.com'; | |
$to_name = 'Tegan Snyder'; | |
$mail = new Zend_Mail(); | |
$mail->setFrom($from_email, $from_name); | |
$mail->addTo($to_email, $to_name); | |
$mail->setSubject('Email test'); | |
$mail->setBodyHtml('Testing the outbound SMTP relay from BEEP'); | |
$mail->send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another version using Magento mailer