I have created an email template in the custom module, This is the code I have used to add the template.
<template>
<email>
<spritzrequestquotation_email_template translate="label" module="sprrequestquotation">
<label>Request Quotation Email</label>
<file>requestquotation_email_template.html</file>
<type>html</type>
</sprrequestquotation_email_template>
</email>
</template>
This is my module folder structure. app/local/Spr/RequestQuotation/
I have created an email template (requestquotation_email_template.html).
Controller code calling the template and sending mail. I am getting an email but mail body is empty.
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('requestquotation_email_template');
//Getting the Store E-Mail Sender Name.
$senderName = Mage::getStoreConfig('trans_email/ident_general/name');
//Getting the Store General E-Mail.
$senderEmail = Mage::getStoreConfig('trans_email/ident_general/email');
//Variables for Confirmation Mail.
$emailTemplateVariables = array(
'firstname' => 'John',
'lastname' => 'D.'
);
$emailTemplateVariables['name'] = $fullName;
$emailTemplateVariables['email'] = $email;
//Appending the Custom Variables to Template.
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
//Sending E-Mail to Customers.
$mail = Mage::getModel('core/email')
->setToName($senderName)
->setToEmail($senderEmail)
->setBody($processedTemplate)
->setSubject('Request A Quotation')
->setFromEmail($senderEmail)
->setFromName($senderName)
->setType('html');
$mail->send();