2021-07-16 22:24:07 +08:00
|
|
|
PHP
|
2021-10-25 15:52:04 +08:00
|
|
|
```php
|
2021-04-14 20:30:42 +08:00
|
|
|
class Plugin extends \RainLoop\Plugins\AbstractPlugin
|
2021-10-25 15:52:04 +08:00
|
|
|
{
|
2022-02-10 23:09:45 +08:00
|
|
|
public function __construct();
|
|
|
|
public function Name() : string;
|
|
|
|
public function Description() : string;
|
|
|
|
public function UseLangs(?bool $bLangs = null) : bool;
|
|
|
|
public function Supported() : string;
|
|
|
|
public function Init() : void;
|
|
|
|
public function FilterAppDataPluginSection(bool $bAdmin, bool $bAuth, array &$aConfig) : void;
|
|
|
|
protected function configMapping() : array;
|
2021-10-25 15:52:04 +08:00
|
|
|
}
|
|
|
|
```
|
2021-04-14 20:30:42 +08:00
|
|
|
|
2022-02-07 22:20:39 +08:00
|
|
|
JavaScript
|
|
|
|
```javascript
|
|
|
|
class PluginPopupView extends rl.pluginPopupView
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
PluginPopupView.showModal();
|
|
|
|
```
|
|
|
|
|
2021-04-14 20:30:42 +08:00
|
|
|
# Hooks
|
|
|
|
|
2021-10-25 15:52:04 +08:00
|
|
|
```php
|
2021-04-14 20:30:42 +08:00
|
|
|
$Plugin->addHook('hook.name', 'functionName');
|
2021-10-25 15:52:04 +08:00
|
|
|
```
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
## Login
|
|
|
|
|
|
|
|
### login.credentials.step-1
|
|
|
|
params:
|
|
|
|
string &$sEmail
|
|
|
|
|
|
|
|
### login.credentials.step-2
|
|
|
|
params:
|
|
|
|
string &$sEmail
|
|
|
|
string &$sPassword
|
|
|
|
|
|
|
|
### login.credentials
|
|
|
|
params:
|
|
|
|
string &$sEmail
|
|
|
|
string &$sLogin
|
|
|
|
string &$sPassword
|
|
|
|
|
|
|
|
### login.success
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
|
|
|
|
## IMAP
|
|
|
|
|
|
|
|
### imap.before-connect
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
2021-10-22 18:45:14 +08:00
|
|
|
\MailSo\Imap\ImapClient $oImapClient
|
|
|
|
array &$aCredentials
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
### imap.after-connect
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
2021-10-22 18:45:14 +08:00
|
|
|
\MailSo\Imap\ImapClient $oImapClient
|
2021-04-14 20:30:42 +08:00
|
|
|
array $aCredentials
|
|
|
|
|
|
|
|
### imap.before-login
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
2021-10-22 18:45:14 +08:00
|
|
|
\MailSo\Imap\ImapClient $oImapClient
|
|
|
|
array &$aCredentials
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
### imap.after-login
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
2021-10-22 18:45:14 +08:00
|
|
|
\MailSo\Imap\ImapClient $oImapClient
|
2021-04-14 20:30:42 +08:00
|
|
|
bool $bSuccess
|
|
|
|
array $aCredentials
|
|
|
|
|
|
|
|
## Sieve
|
|
|
|
|
|
|
|
### sieve.before-connect
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Sieve\ManageSieveClient $oSieveClient
|
2021-10-22 18:45:14 +08:00
|
|
|
array &$aCredentials
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
### sieve.after-connect
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Sieve\ManageSieveClient $oSieveClient
|
|
|
|
array $aCredentials
|
|
|
|
|
|
|
|
### sieve.before-login
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Sieve\ManageSieveClient $oSieveClient
|
2021-10-22 18:45:14 +08:00
|
|
|
array &$aCredentials
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
### sieve.after-login
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Sieve\ManageSieveClient $oSieveClient
|
2021-10-22 18:45:14 +08:00
|
|
|
bool $bSuccess
|
2021-04-14 20:30:42 +08:00
|
|
|
array $aCredentials
|
|
|
|
|
|
|
|
## SMTP
|
|
|
|
|
|
|
|
### smtp.before-connect
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Smtp\SmtpClient $oSmtpClient
|
2021-10-22 18:45:14 +08:00
|
|
|
array &$aCredentials
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
### smtp.after-connect
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Smtp\SmtpClient $oSmtpClient
|
|
|
|
array $aCredentials
|
|
|
|
|
|
|
|
### smtp.before-login
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Smtp\SmtpClient $oSmtpClient
|
2021-10-22 18:45:14 +08:00
|
|
|
array &$aCredentials
|
2021-04-14 20:30:42 +08:00
|
|
|
|
|
|
|
### smtp.after-login
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Smtp\SmtpClient $oSmtpClient
|
|
|
|
bool $bSuccess
|
|
|
|
array $aCredentials
|
|
|
|
|
|
|
|
## Folders
|
|
|
|
|
|
|
|
### filter.folders-post
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mail\FolderCollection $oFolderCollection
|
|
|
|
|
|
|
|
### filter.folders-complete
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mail\FolderCollection $oFolderCollection
|
|
|
|
|
|
|
|
### filter.folders-system-types
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
array &$aList
|
|
|
|
|
|
|
|
### filter.system-folders-names
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
array &$aCache
|
|
|
|
|
|
|
|
## Others
|
|
|
|
|
|
|
|
### filter.account
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
|
|
|
|
### filter.action-params
|
|
|
|
params:
|
|
|
|
string $sMethodName
|
|
|
|
array &$aCurrentActionParams
|
|
|
|
|
|
|
|
### filter.app-data
|
|
|
|
params:
|
|
|
|
bool $bAdmin
|
|
|
|
array &$aAppData
|
|
|
|
|
|
|
|
### filter.application-config
|
|
|
|
params:
|
|
|
|
\RainLoop\Config\Application $oConfig
|
|
|
|
|
|
|
|
### filter.build-message
|
|
|
|
params:
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
|
|
|
|
### filter.build-read-receipt-message
|
|
|
|
params:
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
|
|
|
|
### filter.domain
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Domain &$oDomain
|
|
|
|
|
|
|
|
### filter.fabrica
|
|
|
|
params:
|
|
|
|
string $sName
|
|
|
|
mixed &$mResult
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
|
|
|
|
### filter.http-paths
|
|
|
|
params:
|
|
|
|
array &$aPaths
|
|
|
|
|
|
|
|
### filter.json-response
|
|
|
|
params:
|
|
|
|
string $sAction
|
|
|
|
array &$aResponseItem
|
|
|
|
|
2021-07-16 22:24:07 +08:00
|
|
|
### filter.message-html
|
2021-10-25 15:52:04 +08:00
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
string &$sTextConverted
|
|
|
|
|
2021-04-14 20:30:42 +08:00
|
|
|
### filter.message-plain
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
string &$sTextConverted
|
|
|
|
|
|
|
|
### filter.message-rcpt
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mime\EmailCollection $oRcpt
|
|
|
|
|
|
|
|
### filter.read-receipt-message-plain
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
string &$sText
|
|
|
|
|
|
|
|
### filter.result-message
|
|
|
|
params:
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
|
|
|
|
### filter.save-message
|
|
|
|
params:
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
|
|
|
|
### filter.send-message
|
|
|
|
params:
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
|
|
|
|
### filter.send-message-stream
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
resource &$rMessageStream
|
|
|
|
int &$iMessageStreamSize
|
|
|
|
|
|
|
|
### filter.send-read-receipt-message
|
|
|
|
params:
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
|
|
|
|
### filter.smtp-from
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
string &$sFrom
|
|
|
|
|
|
|
|
### filter.smtp-hidden-rcpt
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
\MailSo\Mime\Message $oMessage
|
|
|
|
array &$aHiddenRcpt
|
|
|
|
|
|
|
|
### filter.smtp-message-stream
|
|
|
|
params:
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
resource &$rMessageStream
|
|
|
|
int &$iMessageStreamSize
|
|
|
|
|
|
|
|
### filter.upload-response
|
|
|
|
params:
|
|
|
|
array &$aResponseItem
|
|
|
|
|
|
|
|
### json.action-post-call
|
|
|
|
params:
|
|
|
|
string $sAction
|
|
|
|
array &$aResponseItem
|
|
|
|
|
|
|
|
### json.action-pre-call
|
|
|
|
params:
|
|
|
|
string $sAction
|
|
|
|
|
2021-07-16 22:27:19 +08:00
|
|
|
### json.attachments
|
|
|
|
params:
|
|
|
|
\SnappyMail\AttachmentsAction $oData
|
|
|
|
|
2021-04-14 20:30:42 +08:00
|
|
|
### json.suggestions-input-parameters
|
|
|
|
params:
|
|
|
|
string &$sQuery
|
|
|
|
int &$iLimit
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
|
|
|
|
### json.suggestions-post
|
|
|
|
params:
|
|
|
|
array &$aResult
|
|
|
|
string $sQuery
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
int $iLimit
|
|
|
|
|
|
|
|
### json.suggestions-pre
|
|
|
|
params:
|
|
|
|
array &$aResult
|
|
|
|
string $sQuery
|
|
|
|
\RainLoop\Model\Account $oAccount
|
|
|
|
int $iLimit
|
|
|
|
|
|
|
|
### main.default-response
|
|
|
|
params:
|
|
|
|
string $sActionName
|
|
|
|
array &$aResponseItem
|
|
|
|
|
|
|
|
### main.default-response-data
|
|
|
|
params:
|
|
|
|
string $sActionName
|
|
|
|
mixed &$mResult
|
|
|
|
|
|
|
|
### main.default-response-error-data
|
|
|
|
params:
|
|
|
|
string $sActionName
|
|
|
|
int &$iErrorCode
|
|
|
|
string &$sErrorMessage
|
|
|
|
|
|
|
|
### main.fabrica
|
|
|
|
params:
|
|
|
|
string $sName
|
|
|
|
mixed &$mResult
|
|
|
|
|
|
|
|
### service.app-delay-start-begin
|
|
|
|
no params
|
|
|
|
|
|
|
|
### service.app-delay-start-end
|
|
|
|
no params
|
2021-07-23 22:21:06 +08:00
|
|
|
|
|
|
|
# JavaScript Events
|
|
|
|
|
|
|
|
## mailbox
|
|
|
|
### mailbox.message-list.selector.go-up
|
|
|
|
### mailbox.message-list.selector.go-down
|
|
|
|
### mailbox.message-view.toggle-full-screen
|
|
|
|
### mailbox.inbox-unread-count
|
|
|
|
### mailbox.message.show
|
|
|
|
## audio
|
|
|
|
### audio.start
|
|
|
|
### audio.stop
|
|
|
|
### audio.api.stop
|
|
|
|
## Misc
|
|
|
|
### idle
|
|
|
|
### rl-layout
|
|
|
|
### rl-view-model
|
|
|
|
event.detail = the ViewModel class
|