Mike Spike Posted November 23, 2011 Share Posted November 23, 2011 Hi, For some reason when using the 'Send to a friend' module and the subject field of an email is long(more than 63 characters including spaces), I get the following error: An error occurred during the process. (This means, that if the title of the item is more than a few words the email does not send. [p.s. I am using phpmail()] I have temporally resolved the issue by amending line 106 in 'sendtofriend.php' by removing '$product->name'; and renaming 'A friend sent you a link to' to 'A friend sent you a link to an item', but this is not ideal. Does anyone know how I can resolve the issue? so that the subject field can be more than 63 characters (including spaces)? Thank you Mike - DovJudaica.com -- if (!Mail::Send((int)$cookie->id_lang, 'send_to_a_friend', Mail::l('A friend sent you a link to').' '.$product->name, $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.'); to if (!Mail::Send((int)$cookie->id_lang, 'send_to_a_friend', Mail::l('A friend sent you a link to an item'), $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.'); Link to comment Share on other sites More sharing options...
Mike Spike Posted December 14, 2011 Author Share Posted December 14, 2011 I have contacted Prestashop and have been advised that mail subject is limited to characters! If anyone else is struggling with this, I suggest you make changes similar to the ones I have suggested above!! If you have any other suggestions, I would be glad to hear them! Thank you Mike - Dov Judaica Link to comment Share on other sites More sharing options...
Recommended Posts