How to send mail to customer and owner from custom tech support form ?

my Template Content is

Name: {{var data.name}}
E-mail: {{var data.email}}
Day: {{var data.day}}
Telephone: {{var data.telephone}}
Message: {{var data.message}}

i want to use this template and send mail to customer and owner

name cof template is support

  • Do you want this mail to be sent to both customer and store owner? Dec 26, 2014 at 7:01
  • Yes................. Dec 26, 2014 at 7:12

2 Answers 2

class Brain_Support_IndexController extends Mage_Core_Controller_Front_Action
public function indexAction()

public function submitAction()
    $emailTemplate = Mage::getModel('core/email_template')
  $emailTemplate2 = Mage::getModel('core/email_template')

$emailTemplateVariables = array();
$emailTemplateVariables['var1'] = $name;
$emailTemplateVariables['var2'] = $cemail;
$emailTemplateVariables['var3'] = $number;
$emailTemplateVariables['var4'] = $message;
$emailTemplateVariables['myname'] = $name;
try {

$emailTemplate->send($email, 'vaibbhav', $emailTemplateVariables);
$emailTemplate2->send($cemail, 'vaibbhav', $emailTemplateVariables);
} catch (Exception $e) {
    echo $e->getMessage();

Magento Admin Panel -> System -> Configuration -> SALES -> Sales Emails -> Order -> Send Order Email Copy To

Enter desired email recipients!


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.