Added FS#3228 - remoting: add mail_relay_recipient functions
| | |
| | | return $affected_rows; |
| | | } |
| | | |
| | | |
| | | //* Get mail relay_recipient details |
| | | public function mail_relay_recipient_get($session_id, $primary_id) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'mail_relay_get')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $app->uses('remoting_lib'); |
| | | $app->remoting_lib->loadFormDef('../mail/form/mail_relay_recipient.tform.php'); |
| | | return $app->remoting_lib->getDataRecord($primary_id); |
| | | } |
| | | |
| | | |
| | | //* relay recipient email |
| | | public function mail_relay_recipient_add($session_id, $client_id, $params) |
| | | { |
| | | if (!$this->checkPerm($session_id, 'mail_relay_add')) |
| | | { |
| | | $this->server->fault('permission_denied','You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $affected_rows = $this->insertQuery('../mail/form/mail_relay_recipient.tform.php', $client_id, $params); |
| | | return $affected_rows; |
| | | } |
| | | |
| | | |
| | | public function mail_relay_recipient_update($session_id, $client_id, $primary_id, $params) |
| | | { |
| | | if (!$this->checkPerm($session_id, 'mail_relay_update')) |
| | | { |
| | | $this->server->fault('permission_denied','You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $affected_rows = $this->updateQuery('../mail/form/mail_relay_recipient.tform.php', $client_id, $primary_id, $params); |
| | | return $affected_rows; |
| | | } |
| | | |
| | | |
| | | public function mail_relay_recipient_delete($session_id, $primary_id) |
| | | { |
| | | if (!$this->checkPerm($session_id, 'mail_relay_delete')) |
| | | { |
| | | $this->server->fault('permission_denied','You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $affected_rows = $this->deleteQuery('../mail/form/mail_relay_recipient.tform.php', $primary_id); |
| | | return $affected_rows; |
| | | } |
| | | |
| | | |
| | | //* Get spamfilter whitelist details |
| | | public function mail_spamfilter_whitelist_get($session_id, $primary_id) |
| | | { |
| | |
| | | $function_list['mail_forward_get,mail_forward_add,mail_forward_update,mail_forward_delete'] = 'Mail forward functions'; |
| | | $function_list['mail_catchall_get,mail_catchall_add,mail_catchall_update,mail_catchall_delete'] = 'Mail catchall functions'; |
| | | $function_list['mail_transport_get,mail_transport_add,mail_transport_update,mail_transport_delete'] = 'Mail transport functions'; |
| | | $function_list['mail_relay_get,mail_relay_add,mail_relay_update,mail_relay_delete'] = 'Mail relay functions'; |
| | | $function_list['mail_whitelist_get,mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions'; |
| | | $function_list['mail_blacklist_get,mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions'; |
| | | $function_list['mail_spamfilter_user_get,mail_spamfilter_user_add,mail_spamfilter_user_update,mail_spamfilter_user_delete'] = 'Mail spamfilter user functions'; |