contao/test — Issue #390: Set real user email as "from" address
Author: importer
Created: 2011-11-29 06:09:24+00:00
State: open
Labels: Duplicate, Feature, framework

Hi Leo, I was getting a lot of requests about changing "FROM" address - which for default is TL_ADMIN_EMAIL - to email of the user who submits the form. I've made all necesarry changes in the code (add from and deleted reply-to) and I'm thinking It would be cool if this feature was default in TYPOlight:

```

// Set "from" address

if (strlen($this->Input->post('email', true)))
{
$email->from = $this->Input->post('email', true);
}
else {
$email->from = $GLOBALS['TL_ADMIN_EMAIL'];
}

if (strlen($this->Input->post('name')))
{
$email->from = $this->Input->post('name') . ' <' . $email->from .'>';
}

```

--- _Originally created by anonymous on January 2nd, 2009, at 01:04pm (ID 390)_