Menu

#8 empty realname problem

closed-out-of-date
None
5
2019-09-21
2005-04-27
Anonymous
No

Hi,

if a field realname is used but is left empty by the user
filling the form, the script generates the header line
From: abc@def.co ()

This displays empty sender in many e-mail programs
and makes it impossible to see the sender's e-mail
address.

I propose to modify the script in the following way:

if \(isset\($form\['realname'\]\) && \(trim\($form

['realname']) != ''))
$realname = $form['realname'];
elseif ((isset($form['firstname']) || isset($form
['lastname'])) && ((trim($form['firstname']) != '') || (trim
($form['lastname']) != '')))
$realname = trim($form
['firstname'] . ' ' . $form['lastname']);

With this modification in the case of empty realname
only the e-mail address without () is used in the From:
field.

Regards
Peter

Discussion

  • Andrew Riley

    Andrew Riley - 2005-05-19
    • assigned_to: nobody --> boaddrink
     
  • Andrew Riley

    Andrew Riley - 2019-09-21
    • status: open --> closed-out-of-date
    • Group: --> PHPFormMail_Advanced
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.