This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Install & configuration » Use name in mail

Use name in mail

Use name in mail

Wednesday 14 December 2011 3:55:44 pm - 1 reply


is it possible to use a syntaxe like "me <>" in settings for define variable like "AdminEmail".


Wednesday 14 December 2011 4:21:48 pm

Hi Guillaume,

Looking at the master branch, it seems that AdminEmail is read and passed to ezcMailAddress systematically. Example from kernel/user/register.php : 

$feedbackReceiver = $ini->variable( 'MailSettings', 'AdminEmail' );
$mail->setReceiver( $feedbackReceiver );

in lib/ezutils/classes/ezmail.php :

function setReceiver( $email, $name = false )    
         $this->Mail->to = array( new ezcMailAddress( $email, $name ) );
         $this->ReceiverElements = array( array( 'name' => $name,
                                                'email' => $email ) );     

$name does not seem to be filled, and one can not populate the $email value with an extended email form as you suggested : the __toString() method in ezcMailAddress will not support it : 

public function __toString()    
           return ( !empty( $this->name ) ? "{$this->name} " : "" ) . "<{$this->email}>";    

The ultimate answer will come from a real-life test, though.



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from