$mail = Mage::getModel('core/email');
$mail->setToName('Your Name');
$mail->setToEmail('Youe Email');
$mail->setBody('Mail Text / Mail Content');
$mail->setSubject('Mail Subject');
$mail->setFromEmail('Sender Mail Id');
$mail->setFromName("Msg to Show on Subject");
$mail->setType('html');// YOu can use Html or text as Mail format
$mail->send();
?>
also you can use
$emailTemplate = Mage::getModel('core/email_template')->load(1); //1 is Transactional Emails id
$emailTemplate->setSenderEmail('sapnandu@gmail.com');
$emailTemplate->setSenderName('Sapnandu');
$emailTemplate->send('sourav.m@gsl.in','John', '');
look on
http://stackoverflow.com/questions/5595202/sending-e-mail-programmatically-in-magento-is-failing
$mail->setToName('Your Name');
$mail->setToEmail('Youe Email');
$mail->setBody('Mail Text / Mail Content');
$mail->setSubject('Mail Subject');
$mail->setFromEmail('Sender Mail Id');
$mail->setFromName("Msg to Show on Subject");
$mail->setType('html');// YOu can use Html or text as Mail format
$mail->send();
?>
also you can use
$emailTemplate = Mage::getModel('core/email_template')->load(1); //1 is Transactional Emails id
$emailTemplate->setSenderEmail('sapnandu@gmail.com');
$emailTemplate->setSenderName('Sapnandu');
$emailTemplate->send('sourav.m@gsl.in','John', '');
look on
http://stackoverflow.com/questions/5595202/sending-e-mail-programmatically-in-magento-is-failing
Hello,
ReplyDeleteGreat help for send email using custom template in magento at following url :
http://www.webslike.com/Thread-How-to-send-an-email-with-custom-template-in-magento
This is a great post. I like this topic.This site has lots of advantage. It helps me in many ways.Thanks for posting this again.
ReplyDeletemagento development company in bangalore