To all,

First of all many thx for your great app.
I am using the 4.5.1e version of Sugar and I am facing an issue when I try to send an e-mail in the logic hook file for my customized object "Opportunity". I know that E-mail are working preety well because when doing manualy, they do fire properly.
Can anyone take a look at the following code being given that in my Log file I am getting the following message "

Mon Dec 3 22:13:12 2007,812 [18636] FATAL SugarCRM - SugarPHPMailer encountered an error: You must provide at least one recipient email address.

See code hereafter.
PHP Code:
require_once('modules/Emails/Email.php');
            
$focus = new Email();
            
$focus->type 'out';
            
$focus->from_addr "eceyral@oceansystem.com";
            
$focus->from_name "Eric Ceyral";
            
$focus->to_addrs "eceyral@oceansystem.com";
            
$focus->name "Nouvelle Installation : ".$bean->name." a planifier";
            
$focus->description "Test envoi E-mail";
            
$focus->account_id $account->account_id;
            
$focus->assigned_user_id $assigned_user_id;
            
$focus->to_addrs_emails "eceyral@oceansystem.com";
            
$focus->fill_in_additional_detail_fields();
            
            foreach(
$focus as $key => $value) {
                
$valueObject .="$key => $value\n";
            }
                    
            
$focus->save();
            
            if(
$focus->send()) {
                
$focus->status 'sent';
                
$today gmdate('Y-m-d H:i:s');
                
$focus->date_start $timedate->to_display_date($today);
                
$focus->time_start $timedate->to_display_time($todaytrue);
            } else {
            
$focus->status 'send_error';
            }
            
$GLOBALS['log']->fatal("Contenu objet E-mail => ".$valueObject);
            
$focus->save(); 
Thx in advance for your help.

Eric (Poor lonesome French User)