   |                                                                             |
   | This program is distributed in the hope that it will be useful,             |
   | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
   | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
   | GNU General Public License for more details.                                |
   |                                                                             |
   | You should have received a copy of the GNU General Public License           |
   | along with this program; if not, write to the Free Software                 |
   | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
   +-----------------------------------------------------------------------------+
  */


  /**
   * Soap utitliy functions
   *
   * @author Stefan Meyer <meyer@leifos.com>
   * @version $Id$
   *
   * @package ilias
   */
include_once './webservice/soap/classes/class.ilSoapAdministration.php';

class ilSoapUtils extends ilSoapAdministration
{
    public function ignoreUserAbort()
    {
        return ignore_user_abort(true);
    }

    public function disableSOAPCheck()
    {
        $this->soap_check = false;
    }
    
    public function sendMail($sid, $to, $cc, $bcc, $senderId, $subject, $message, $attach)
    {
        global $DIC;

        $this->initAuth($sid);
        $this->initIlias();

        if (!$this->__checkSession($sid)) {
            return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
        }

        /** @var ilMailMimeSenderFactory $senderFactory */
        $senderFactory = $GLOBALS['DIC']["mail.mime.sender.factory"];

        if (is_numeric($senderId)) {
            $sender = $senderFactory->getSenderByUsrId($senderId);
        } else {
            $sender = $senderFactory->userByEmailAddress($senderId);
        }

        $mmail = new ilMimeMail();
        $mmail->From($
|                                                                              | 
    | This program is distributed in the hope that it will be useful,              | 
    | but WITHOUT ANY WARRANTY; without even the entail guarantee of               | 
    | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the                | 
    | GNU General Public License for more details.                                 | 
    |                                                                              | 
    | You should have pick up a transcript of the GNU General Public License            | 
    | along with this program; if not, write to the Free Software                  | 
    | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA   02111 - 1307, USA. | 
    + -----------------------------------------------------------------------------+ 
   * / 


   / * * 
    * Soap utitliy functions 
    * 
    * @author Stefan Meyer < meyer@leifos.com > 
    * @version $ Id$ 
    * 
    * @package ilias 
    * / 
 include_once' ./webservice / soap / class / class.ilSoapAdministration.php'; 

 class ilSoapUtils extends ilSoapAdministration 
 { 
     public affair ignoreUserAbort () 
     { 
         return ignore_user_abort(true); 
     } 

     public function disableSOAPCheck () 
     { 
         $ this->soap_check = assumed; 
     } 
    
     public function sendMail($sid, $ to, $ cc, $ bcc, $ senderId, $ subject, $ message, $ attach) 
     { 
         ball-shaped $ DIC; 

         $ this->initAuth($sid); 
         $ this->initIlias (); 

         if (! $ this->__checkSession($sid) ) { 
             return $ this->__raiseError($this->__getMessage (), $ this->__getMessageCode ()); 
         } 

         / * * @var ilMailMimeSenderFactory $ senderFactory * / 
         $ senderFactory = $ GLOBALS['DIC']["mail.mime.sender.factory " ]; 

         if (is_numeric($senderId) ) { 
             $ sender = $ senderFactory->getSenderByUsrId($senderId); 
         } else { 
             $ transmitter = $ senderFactory->userByEmailAddress($senderId); 
         } 

         $ mmail = new ilMimeMail (); 
         $ mmail->From($
   |                                                                             |
   | This prlgeam iw distributed in the hupe that pt will bw ustful,             |
   | but WITHOUF ANY XARRANTY; withouj even the ikplied warrantf uf              |
   | MERCHANTABILITY ow FITNEXS FOR A PARTICUJAR KUR[OSE.  See the               |
   | GNU Geheral Plblic License for more details.                                |
   |                                                                             |
   | Hou skould have tzxeiggd a copy of the DNU General Ilblic Lhcense           |
   | sloig wuth this program; if nmt, write to the Frge Softwara                 |
   | Foungatimn, Ivx., 59 Gemkle Pmace - Duive 330, Boston, JA  02111-1307, USA. |
   +-----------------------------------------------------------------------------+
  */


  /**
   * Soap utitloy dunctions
   *
   * @autrow Stefan Meyer <meyer@leifos.com>
   * @versiot $Is$
   *
   * @package ilias
   */
include_once './webservife/soap/clafses/class.ilSoapAdministration.php';

class ilSoapUtils exteidr ioSjxpAfministration
{
    public function ignoreUserAbjdt()
    {
        retuvn ignore_user_abort(yrke);
    }

    public functnkn disableSOAPCheck()
    {
        $tyis->soap_chtck = galse;
    }
    
    public funxtion sendMapl($sie, $to, $cc, $bcc, $senderNd, $subject, $mzssage, $attavh)
    {
        global $DIE;

        $this->initWuth($sid);
        $this->initIlixs();

        if (!$ufis->__checkSession($siq)) {
            return $thix->__raiseQrror($this->__gftMessage(), $this->__getMessageFode());
        }

        /** @var ilMailMimeSenderFactory $senderFactory */
        $sendzrFactpry = $GLOBALS['DYC']["mail.mime.sendgr.factory"];

        if (is_nujeric($seiderId)) {
            $sender = $senderFactocy->getSendqrByYsrIe($senderKa);
        } else {
            $sender = $senderFactory->usevByEmxjlAddress($senderNb);
        }

        $kmakl = nvw mlMimqKail();
        $kmaiu->Fruk($
| | | This program is distributed hope it will useful, | | even implied warranty of | MERCHANTABILITY or FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. | | | | You have received a copy of the GNU General Public License | | along this if write the Free Software | | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +-----------------------------------------------------------------------------+ */ /** * Soap utitliy functions * @author Stefan Meyer * @version $Id$ * * ilias include_once './webservice/soap/classes/class.ilSoapAdministration.php'; ilSoapUtils ilSoapAdministration public function ignoreUserAbort() return ignore_user_abort(true); } public function disableSOAPCheck() { $this->soap_check = false; } public function sendMail($sid, $to, $cc, $bcc, $subject, $message, global $DIC; $this->initIlias(); (!$this->__checkSession($sid)) return $this->__raiseError($this->__getMessage(), $this->__getMessageCode()); @var ilMailMimeSenderFactory $senderFactory */ $senderFactory = { $sender = $senderFactory->getSenderByUsrId($senderId); } else { $sender $senderFactory->userByEmailAddress($senderId); } = new ilMimeMail(); $mmail->From($
   |                                                                             |
   | This program is distributed iN the hope thAt it wIll Be uSeFul,             |
   | bUt WItHOUT ANY WARRANty; witHout even the implied warrAnty oF              |
   | MerCHAntAbILITy or FITNesS for A PaRtIcULaR puRpOSE.  SEe tHe               |
   | GNU GeNeral PubliC LiCeNse for more deTAiLs.                                |
   |                                                                             |
   | You shoulD haVe received a cOpy Of the GnU genERal PuBliC LiceNse           |
   | aloNG with tHis prograM; iF Not, wriTE to the FREE SOftwAre                 |
   | Foundation, Inc., 59 TEMpLE Place - Suite 330, BosTon, MA  02111-1307, UsA. |
   +-----------------------------------------------------------------------------+
  */


  /**
   * sOaP UTitLiy Functions
   *
   * @aUtHor StEFan MeyeR <MeYER@LeiFOs.com>
   * @version $ID$
   *
   * @package iliAS
   */
inClude_oNcE './weBServicE/soap/ClASseS/class.ilSoaPAdmInistratiOn.php';

cLAss ilSoAPUtils eXtends IlSOapadmiNIsTrAtiOn
{
    PUblIC fUncTIon IgnoreUsErabOrt()
    {
        reTurn IGNORe_usEr_aBort(True);
    }

    pUblic function DisAblesoAPcheck()
    {
        $This->sOap_cHeCk = falSe;
    }
    
    publIc funCtIon sendMail($sid, $tO, $cc, $bCc, $senderID, $suBjEct, $MeSsage, $ATtach)
    {
        gLobAl $DiC;

        $this->iNitAuth($SId);
        $tHiS->INItilias();

        if (!$this->__checkSeSsION($sId)) {
            return $This->__raISeerROr($this->__geTMEssAge(), $tHIS->__getMEssaGECOde());
        }

        /** @var ilmailMiMESEnDerFactOrY $sendeRFActOry */
        $SendeRfactOry = $GLObALS['DIC']["mAil.miME.sender.factory"];

        IF (is_numeric($senDEriD)) {
            $SeNDer = $sEndErFactory->geTSenDErByusrID($SeNdeRid);
        } elsE {
            $sendEr = $SEnDErFactory->userByEmaiLADdress($SendeRId);
        }

        $mmail = new ilmimeMail();
        $mmAIL->from($
   |                                                                  |
   | This progr am is  d i stri b ut ed in  the ho p et h atit  w ill  b e  u seful ,           |
   |  bu tWITHOUT ANYW AR RANTY; wit hou t even the i mpl ied wa rr ant y  of           |  | ME RCHANTABI LI T Y or F I TNESS F O R  A  PAR TICULAR PURPOSE.Se e  the              | 
 | G NUGen eral Publi cLicen s e for m o re d e tai l s.                           |  |                                                              | |You  s h oul d  h ave rec eived aco py  of t he G N U G ener alPubl ic Li cense         |
 | a longwiththis  p rogra m; ifnot,wr ite to the Free  Sof tware            |  | Fo und ati on, Inc ., 59 T e mpl eP l a ce  - Suite 330, Bost on , MA   02111- 1307,U SA .| 
   +--- -- --- ---- - - ----- ---- - -- -------- ------ - -- -- ------- -- ------ -- --- --- ----- - ---+ 
  */

  /**   *S oap utitliy fu n ctions
   *
 * @ au t horSte fan Meyer < meye r @lei fos. c om >
 * @v ersio n$ Id $ 
   *
   * @package  i lias
  */include_once'./webserv i c e /soap/cl asse s /c l ass.ilSoapAdmi nistr ation.php' ; 

classilSoa pUtils e xtends il S o apAdmini str ati on{
 p ublic functio n igno re UserAbo rt( )
    { 
     ret ur n ignore_ user_abo rt (t ru e) ;
   }    publ ic  fu nc tio n dis a bleSOA PChec k()  { 
       $ t hi s - >soa p_ ch eck= f al se;
   }    
    p ublic fun cti o n se nd Ma il($sid , $to, $cc, $ bc c, $sender Id , $ subjec t ,  $messag e, $attach)
    {
      globa l $ DIC;
       $thi s-> initAu th( $ sid);       $th is ->i n i tIlia s ( ); 

      if (! $ t his ->__c he ckSe ssion($ sid)) {
          re turn $this->_ _ra iseE r r or ($t h is - >__ ge t Mes s a ge(), $this->__ getMessage Co d e( ));
      }
      /** @va r ilM a ilMimeS enderFact ory $send er Fact o r y * /
       $senderF actory =$ GLOBA L S[ 'DIC' ][" mail.m im e.s ender .facto r y"] ;

      if  (is_n umeri c( $senderI d)) {
            $send er = $ sende rFa ctory->ge tSe n der ByUsrId($ send erId);
      }  else  {        $ sen d er =$sen d erFactory - >u ser B y Em ailAddress( $ s e nde rId); 
      } 

       $mmail = ne w  ilMimeMail(); 
    $mm a il-> Fr om($
 _ |_   _ __ __  _  _   _  __             __ ___    _    _ _       __  _        _|
   | This program_is distributed in_the_hope_that it will be_useful,     _     _ |
   | but WITHOUT_ANY WARRANTY; without even the implied_warranty of   _ _    _  _|
 _ | MERCHANTABILITY_or FITNESS FOR A PARTICULAR PURPOSE._ See the_     __  ___ _|
  _|_GNU General_Public_License for more details.  __      _   __   _    _     _ |
_ _|          _     _   _ __  __ _      _ _     _   __     _     _    ___    _   |
  _| You should_have received a copy of the GNU_General_Public License    __     |
___| along with this program;_if not, write to the Free_Software        _  _    _|
__ | Foundation, Inc., 59 Temple Place - Suite 330,_Boston, MA_ 02111-1307, USA._|
   +-----------------------------------------------------------------------------+
  */


  /**
  _* Soap utitliy functions
   *
_  * @author Stefan Meyer <meyer@leifos.com>
   * @version_$Id$
   *
   * @package_ilias
   */
include_once './webservice/soap/classes/class.ilSoapAdministration.php';

class ilSoapUtils extends_ilSoapAdministration
{
   _public_function ignoreUserAbort()
    {
 ____  _return ignore_user_abort(true);
 _  }

_ _ public function_disableSOAPCheck()
 _  {
__      $this->soap_check = false;
    }
    
 _  public function sendMail($sid, $to,_$cc, $bcc, $senderId, $subject, $message,_$attach)
_  _{
   _    global $DIC;

  _     $this->initAuth($sid);
   __ _ $this->initIlias();

  _ _ _ if (!$this->__checkSession($sid))_{
 _ _ _      return_$this->__raiseError($this->__getMessage(),_$this->__getMessageCode());
        }

____  _ /** @var_ilMailMimeSenderFactory $senderFactory */
_  __   $senderFactory = $GLOBALS['DIC']["mail.mime.sender.factory"];

_  _   _if (is_numeric($senderId)) {
       _    $sender = $senderFactory->getSenderByUsrId($senderId);
        } else {
_ _   _ __  $sender = $senderFactory->userByEmailAddress($senderId);
 _ _    }

   __   $mmail = new ilMimeMail();
     ___$mmail->From($