I have created a separate contact form, this form sends the info collected to an email, collecting the data seems to be working, sending the email as well... but the info collected is not sent to the email, i'm only getting static content as test but the info collected is missing, i've tried different things, here's my code in the controller, i commented each method used.
<?php
class Yo_Wholesaleform_IndexController extends Mage_Core_Controller_Front_Action{
public function indexAction(){
$this->loadLayout();
$this->_initLayoutMessages('core/session');
$this->renderLayout();
}
public function sendAction(){
$post = $this->getRequest()->getPost();
//i've tried this method
$company_name = trim($post['company_name']);
//also this method
$company_name = $post['company_name'];
$first_name = $post['first_name'];
$last_name = $post['last_name'];
$fullName = $first_name." ".$last_name;
$formcontent = " From: $fullName
Company: $company_name
Email: $email"; //here
$recipient = "alex@nalashandmade.com";
$subject = "Wholesale Account Request";
$mailheader = "From: $email
";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
Mage::getSingleton('core/session')->addSuccess($this->__('Thanks for submitting your Wholesale Account Request. Allow us 48 hours to review your information.'));//add success message.
$this->_redirect('*/*');
}
}