php - Magento change email address of form -


i bought magento based website days ago. there form in page website.com/service
actual code in backend is:

{{block type="core/template" name="serviceform" form_action="/contacts/index/service" template="contacts/form_service.phtml"}} 

and in front-end

<form method="post" id="contactform" action="/contacts/index/service"> 

it not contact form contact form lots of additional parameters.
want edit email address form submitted to.

if form action /contacts/index/post/ have edited file at

/app/code/core/mage/contacts/controllers/indexcontroller.php  

but unable find file can edit /contacts/index/service . think form working tells me

your inquiry submitted , responded possible. thank contacting us.

after redirecting me page after form submission.
want edit email , need find location of file.

@aynber located function me can't seem find email.

public function serviceaction()     {         $post = $this->getrequest()->getpost();         if ( $post ) {             $translate = mage::getsingleton('core/translate');             /* @var $translate mage_core_model_translate */             $translate->settranslateinline(false);             try {                 $postobject = new varien_object();                 $postobject->setdata($post);                  $error = false;                  if (!zend_validate::is(trim($post['name']) , 'notempty')) {                     $error = true;                 }                  if (!zend_validate::is(trim($post['comment']) , 'notempty')) {                     $error = true;                 }                  if (!zend_validate::is(trim($post['email']), 'emailaddress')) {                     $error = true;                 }                  if (zend_validate::is(trim($post['hideit']), 'notempty')) {                     $error = true;                 }                  if ($error) {                     throw new exception();                 }                 $mailtemplate = mage::getmodel('core/email_template');                 /* @var $mailtemplate mage_core_model_email_template */                 $mailtemplate->setdesignconfig(array('area' => 'frontend'))                     ->setreplyto($post['email'])                     ->sendtransactional(                         mage::getstoreconfig(self::xml_path_email_template),                         mage::getstoreconfig(self::xml_path_email_sender),                         mage::getstoreconfig(self::xml_path_email_recipient),                         null,                         array('data' => $postobject)                     );                  if (!$mailtemplate->getsentsuccess()) {                     throw new exception();                 }                  $translate->settranslateinline(true);                  mage::getsingleton('customer/session')->addsuccess(mage::helper('contacts')->__('your inquiry submitted , responded possible. thank contacting us.'));                 $this->_redirect('*/*/');                  return;             } catch (exception $e) {                 $translate->settranslateinline(true);                  mage::getsingleton('customer/session')->adderror(mage::helper('contacts')->__('unable submit request. please, try again later'));                 $this->_redirect('*/*/');                 return;             }          } else {             $this->_redirect('*/*/');         }     } 

it should still in file, function serviceaction() inside of indexcontroller.php. if it's not there, see if there corresponding indexcontroller.php somewhere inside of app/code/local directory. forms pull email address set in system configuration under contacts.

edit

the line you're looking change

mage::getstoreconfig(self::xml_path_email_recipient), 

that address pulled system configuration. can hardcode email address, or set configured email address.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -