I'm trying to, when an email is sent within my Symfony2 application, to name the sender
Administrator <[email protected]>
I've tried in the parameters.ini
:
mailer_from = {"[email protected] : Administrator"}
It seems possible to do so because in SimpleMessage.php we do have :
/**
* Set the sender of this message.
* This does not override the From field, but it has a higher significance.
* @param string $sender
* @param string $name optional
* @return Swift_Mime_SimpleMessage
*/
public function setSender($address, $name = null)
{
if (!is_array($address) && isset($name))
{
$address = array($address => $name);
}
if (!$this->_setHeaderFieldModel('Sender', (array) $address))
{
$this->getHeaders()->addMailboxHeader('Sender', (array) $address);
}
return $this;
}
All the things I tried in the parameters.ini
failed. Do you have any idea of what i'm doing wrong please ?