From a70d55cc82bedda4e44381f33ef78f0856fe595e Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Fri, 13 Aug 2004 15:47:46 +0000 Subject: [PATCH] use emailaddress from accounts table --- emailadmin/inc/class.defaultsmtp.inc.php | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 emailadmin/inc/class.defaultsmtp.inc.php diff --git a/emailadmin/inc/class.defaultsmtp.inc.php b/emailadmin/inc/class.defaultsmtp.inc.php new file mode 100644 index 0000000000..44a2b84148 --- /dev/null +++ b/emailadmin/inc/class.defaultsmtp.inc.php @@ -0,0 +1,58 @@ +profileData = $_profileData; + } + + // add a account + function addAccount($_hookValues) + { + return true; + } + + // delete a account + function deleteAccount($_hookValues) + { + return true; + } + + function getAccountEmailAddress($_accountName) + { + $accountID = $GLOBALS['phpgw']->accounts->name2id($_accountName); + $emailAddress = $GLOBALS['phpgw']->accounts->id2name(accountID,'account_email'); + if(empty($emailAddress)) + $emailAddress = $_accountName.'@'.$this->profileData['defaultDomain']; + + return array( + array( + 'name' => $GLOBALS['phpgw_info']['user']['fullname'], + 'address' => $emailAddress, + 'type' => 'default' + ) + ); + } + + // update a account + function updateAccount($_hookValues) + { + return true; + } + } +?>