<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf 
 */

namespace Kufer\KuferTools\Ausgaben\SammelEMail\EmailTasks;


class MailAnAbsenderCommand extends MailCommand {
  
  public function execute(EmailSendObj $pEmailSendObj) {
    

     
    $empfaenger = $this->getAbsenderToInform( $pEmailSendObj->person );
    $empfaengerAry = array($empfaenger);
    
    $versandInformationAry = $this->sendMails( $empfaengerAry, $pEmailSendObj->person, $pEmailSendObj->toolId, $pEmailSendObj->emailContent, $pEmailSendObj->attachStrategy);

    return $versandInformationAry;  
  } 
    
  
  protected function getAbsenderToInform($pAbsender)
  {
    return array( 'user' => $pAbsender, 'email' => $pAbsender->getVarValueEx( 'email', 'kommunikation' ) );
    
  }
  
}
?>