0

Is there any way to send single invoice email that will have different order/invoice details like Invoice #0000085-89 via a single email.

1 Answer 1

0

Here is the code, you have to add your data or orders details in $html file and then send it.

<?php

$html="<p>Here is some content</p>";
$mail = Mage::getModel('core/email');
$mail->setToName('Your Name'); //send the name
$mail->setToEmail('Your Email');  //Set email
$mail->setBody($html);
$mail->setSubject('Mail Subject'); //Set email subject
$mail->setFromEmail('Sender Mail Id'); //Set email from
$mail->setFromName("From Name"); //Set from name
$mail->setType('html'); // You can use Html or text as Mail format

try {
$mail->send(); //To send email
Mage::getSingleton('core/session')->addSuccess('Email Sent Successfully');
}
catch (Exception $e) {
Mage::getSingleton('core/session')->addError('Unable to send.');
}

?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.