Location: PHPKode > projects > NetOffice > netoffice/includes/notification.class.php
<?php // $Revision: 1.8 $
/* vim: set expandtab ts=4 sw=4 sts=4: */

/**
 * $Id: notification.class.php,v 1.8 2004/01/19 18:05:06 madbear Exp $
 * 
 * Copyright (c) 2003 by the NetOffice developers
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

class notification extends phpmailer {
    function notification()
    {
        global $strings, $root, $notificationMethod, $setCharset, $base_dir;

        $this->Mailer = $notificationMethod;
        $this->PluginDir = $base_dir . 'includes/phpmailer/';

        // Sets the CharSet of the message
        $this->CharSet = $setCharset;

        if ($this->Mailer == 'smtp') {
            $this->Host = SMTPSERVER;
            $this->Username = SMTPLOGIN;
            $this->Password = SMTPPASSWORD;
        } 

        $this->footer = "--\n" . $strings['noti_foot1'] . "\n\n" .
                        $strings['noti_foot2'] . "\n" . 
                        $root . '/general/login.php';
    } 

    function getUserinfo($idUser, $type)
    {
        $tmpquery = "WHERE mem.id = '$idUser'";
        $detailUser = new request();
        $detailUser->openMembers($tmpquery);
        if ($type == "from") {
            $this->From = $detailUser->mem_email_work[0];
            $this->FromName = $detailUser->mem_name[0];
        } 
        if ($type == 'to') {
            $this->AddAddress($detailUser->mem_email_work[0], $detailUser->mem_name[0]);
        } 
    } 
} 

?>
Return current item: NetOffice