Sending mail using Magento

IT Bolg Management

Go To
Open /app/code/core/Mage/Core/Model/Email/Template.php and add the following to the send() method

public function send($email, $name=null, array $variables = array())
{
if(!$this->isValidForSend()) {
return false;
}

$config = array(
‘ssl’ => ‘tls’, //optional
‘port’ => Mage::getStoreConfig(‘system/smtp/port’), //optional –     default 25
‘auth’ => ‘login’,
‘username’ => ‘username@somesite.com’,
‘password’ => ‘secret’
);
$transport=newZend_Mail_Transport_Smtp(Mage::getStoreConfig(‘system/smtp/host’), $config);

Now,

try {
$mail->send($transport); //add $transport object as parameter
$this->_mail = null;
}
catch (Exception $e) {

return false;

}

return true;
}

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s