Jump to content

'Send to a friend' not working for long product titles


Recommended Posts

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

  • 3 weeks later...
×
×
  • Create New...