mecjos Posted May 7, 2011 Share Posted May 7, 2011 Hi friends. I want to use sendtofriend module but it gives an error saying that "An error occurred during the process." and these lines if (empty($_POST['email']) OR empty($_POST['name'])) $error = $this->l('You must fill all fields.'); elseif (!Validate::isEmail($_POST['email'])) $error = $this->l('Your friend\'s email is invalid.'); elseif (!Validate::isName($_POST['name'])) $error = $this->l('Your friend\'s name is invalid.'); elseif (!isset($_GET['id_product']) OR !is_numeric($_GET['id_product'])) $error = $this->l('An error occurred during the process.'); else {gives that error. Thank you.. Link to comment Share on other sites More sharing options...
mecjos Posted May 7, 2011 Author Share Posted May 7, 2011 Sorry, i'm correcting.. i guess the problem due to this lines :/* Email sending */ if (!Mail::Send(intval($cookie->id_lang), 'send_to_a_friend', $subject, $templateVars, $_POST['email'], NULL, ($cookie->email ? $cookie->email : NULL), ($cookie->customer_firstname ? $cookie->customer_firstname.' '.$cookie->customer_lastname : NULL), NULL, NULL, dirname(__FILE__).'/mails/')) $error = $this->l('An error occurred during the process.'); else $confirm = $this->l('An email has been sent successfully to').' '.Tools::safeOutput($_POST['email']).'.'; } } else { global $cookie, $link;it occurs while sending e-mail.. i can send test e-mail from mail preference page but i can't use send to friend module.. thank you again.g Link to comment Share on other sites More sharing options...
Recommended Posts