I try to add Transaction mail but i am not getting any mail
$template_id = 'my_custom_email';
// Who were sending to...
$email_to = '[email protected]';
$customer_name = $name;
// Load our template by template_id
$email_template = Mage::getModel('core/email_template')->loadDefault($template_id);
$custom_variable = 'my custom variable for my custom eamil template';
// Here is where we can define custom variables to go in our email template!
$email_template_variables = array(
'custom_variable' => $custom_variable
// Other variables for our email template.
);
// In my case I am using the Store Name as sender name here.
$sender_name = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
// In my case I am using the general store contact here as the sender email.
$sender_email = Mage::getStoreConfig('trans_email/ident_general/email');
$email_template->setSenderName($sender_name);
$email_template->setSenderEmail($sender_email);
//Send the email!
$email_template->send($email_to, $customer_name, $email_template_variables);
Config.xml
<template>
<email>
<my_custom_email>
<label>Custom email</label>
<file>custome_email.html</file>
<type>html</type>
</my_custom_email>
</email>
</template>
custome_email.html
<!--@subject My custom email template @-->
<!--@vars
{"store url=\"\"":"Store Url",
"var logo_url":"Email Logo Image Url",
"var logo_alt":"Email Logo Image Alt",
"var data.custom_variable":"Custom variable"}
@-->
<!--@styles
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
@-->
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
<tr>
<td align="center" valign="top" style="padding:20px 0 20px 0">
<!-- [ header starts here] -->
<table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
<!-- [ Header starts here] -->
<tr>
<td valign="top">
<a href="{{store url=""}}" style="color:#1E7EC8;"><img src="{{var logo_url}}" alt="{{var logo_alt}}" border="0"/></a>
</td>
</tr>
<!-- [ Header ends here] -->
<!-- [ middle starts here] -->
<tr>
<td valign="top">
<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">This is my custom email template</h1>
<p style="font-size:12px; line-height:16px; margin:0 0 8px 0;"><strong>My custom variable is :</strong> {{var custom_variable}}</p>
</td>
</tr>
<!-- [middle ends here]-->
<!-- [Footer content starts here] -->
<tr>
<td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
</tr>
<!-- [Footer content ends here] -->
</table>
</td>
</tr>
</table>
</div>
</body>
what's wrong on this
<template>
is inside the<global>
tag and check admin panel email template is listed or not..system-> transactional email
and add new check in dropdown your template is listed or not