I have the Tell A Friend module up and running and working properly... with one issue. The e-mails go through, but the from name and e-mail address are missing from the sent e-mails.

I've gone over the code a few times and I'm at a loss. Any suggestions?

Comments

ekrispin’s picture

Component: Miscellaneous » Code

The problem seems to be in line 330

$from = variable_get('tellafriend_fromaddress', $form_values['tellafriend_email']);

According to a short debugging I ran, tellafriend_fromaddress seems to be set (though no value entered in the tellafriend admin panel) and therefore isset in variable_get does not take the default value $form_values['tellafriend_email'] (which does have the appropriate value).

The same happens also with $closing.

I bypassed it until a patch is issued.

ekrispin’s picture

I subsituted the above mentioned line with

$from = $form_values['tellafriend_name']. "<".$form_values['tellafriend_email']. ">";

and it works fine now.

wmostrey’s picture

That is indeed how I fixed it too. Since both fields are required, that seems like a safe solution.
+1

thierry_gd’s picture

Just committed this on drupal.org

thierry_gd’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)