mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-03-01 01:06:38 +08:00
Created API (markdown)
parent
f51da513fa
commit
5de35dff3a
1 changed files with 37 additions and 0 deletions
37
API.md
Normal file
37
API.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
```php
|
||||
<php
|
||||
|
||||
$_ENV['SNAPPYMAIL_INCLUDE_AS_API'] = true;
|
||||
require_once '/path/to/snappymail_root/index.php';
|
||||
// or with specific version
|
||||
//require_once '/path/to/snappymail_root/snappymail/v/2.36.1/include.php';
|
||||
|
||||
// returns instance of \RainLoop\Actions
|
||||
\RainLoop\Api::Actions();
|
||||
|
||||
// returns instance of \RainLoop\Config\Application
|
||||
\RainLoop\Api::Config();
|
||||
|
||||
// returns instance of \SnappyMail\HTTP\CSP
|
||||
\RainLoop\Api::getCSP(string $sScriptNonce = null);
|
||||
|
||||
// returns instance of \MailSo\Log\Logger
|
||||
\RainLoop\Api::Logger();
|
||||
|
||||
// returns string or null
|
||||
\RainLoop\Api::CreateUserSsoHash(
|
||||
string $sEmail,
|
||||
#[\SensitiveParameter]
|
||||
string $sPassword,
|
||||
array $aAdditionalOptions = array(), bool $bUseTimeout = true
|
||||
)
|
||||
|
||||
// returns bool
|
||||
\RainLoop\Api::ClearUserSsoHash(string $sSsoHash);
|
||||
|
||||
// returns bool
|
||||
\RainLoop\Api::ClearUserData(string $sEmail);
|
||||
|
||||
// returns bool
|
||||
\RainLoop\Api::LogoutCurrentLogginedUser();
|
||||
```
|
Loading…
Reference in a new issue