I have got it working rather splendidly via:
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
->setType('Html')
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
"Vish Sales",
array('data' => $postObject)
);
if (!$mailTemplate->getSentSuccess()) {
throw new Exception();
} else{
$subject = "Vish Request";
$body = "
<p>Thank you for requesting our new catalogue, which will be posted out to you immediately.</p>"
$sender = Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER);
$mail = Mage::getModel('core/email');
$mail->setToName($name);
$mail->setFromName("no-reply");
$mail->setToEmail($email);
$mail->setReplyTo('[email protected]');
$mail->setBody($body);
$mail->setSubject($subject);
$mail->setFromEmail(Mage::getStoreConfig('trans_email/ident_' . $sender . '/email'));
$mail->setType('html');
$mail->setBodyHTML($body);
$mail->send();
}
However, I am not sure if the section below is done in a correct manner:
$subject = "Vish Request";
$body = "
<p>Thank you for requesting our new catalogue, which will be posted out to you immediately.</p>"
$sender = Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER);
$mail = Mage::getModel('core/email');
$mail->setToName($name);
$mail->setFromName("no-reply");
$mail->setToEmail($email);
$mail->setReplyTo('[email protected]');
$mail->setBody($body);
$mail->setSubject($subject);
$mail->setFromEmail(Mage::getStoreConfig('trans_email/ident_' . $sender . '/email'));
$mail->setType('html');
$mail->setBodyHTML($body);
$mail->send();
Thus, could someone confirm if this is an acceptable way or how could I do the same as the above but for multiple templates?