POST api/2.0/mail/accounts
Creates an account using full information about mail servers specified in the request.
Name |
Description |
Type |
Example |
name
sent in body
|
Account name in Teamlab
|
string
|
some text
|
email
sent in body
|
Account email address in the name@domain format
|
string
|
some text
|
account
sent in body
|
IMAP or POP server login
|
string
|
some text
|
password
sent in body
|
IMAP or POP server password
|
string
|
some text
|
port
sent in body
|
IMAP or POP server port
|
number
|
1234
|
server
sent in body
|
IMAP or POP server address or IP
|
string
|
some text
|
smtp_account
sent in body
|
SMTP server login
|
string
|
some text
|
smtp_password
sent in body
|
SMTP server password
|
string
|
some text
|
smtp_port
sent in body
|
SMTP server port
|
number
|
1234
|
smtp_server
sent in body
|
SMTP server address or IP
|
string
|
some text
|
smtp_auth
sent in body
|
Specifies if the authentication is needed for the SMTP server or not
|
Bool value
|
true
|
imap
sent in body
|
Specifies if the IMAP server is used for incoming mails or not
|
Bool value
|
true
|
restrict
sent in body
|
Specifies if all the mails should be downloaded from the account (false) or not (true). If true, then messages from last 30 days only will be downloaded
|
Bool value
|
true
|
incoming_encryption_type
sent in body
|
Encryption type for the IMAP or POP server: 0 - None, 1 - SSL, 2 - StartTLS
|
None, SSL, StartTLS
|
|
outcoming_encryption_type
sent in body
|
Encryption type for the SMTP server: 0 - None, 1 - SSL, 2 - StartTLS
|
None, SSL, StartTLS
|
|
auth_type_in
sent in body
|
Authentication type for the IMAP or POP server: 1 - Login, 4 - CremdMd5, 5 - OAuth2
|
None, Login, CramMd5, OAuth2
|
|
auth_type_smtp
sent in body
|
Authentication type for the SMTP server: 0 - None, 1 - Login, 4 - CremdMd5, 5 - OAuth2
|
None, Login, CramMd5, OAuth2
|
|
POST api/2.0/mail/accounts
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
{
"name": "some text",
"email": "some text",
"account": "some text",
"password": "some text",
"port": 1234,
"server": "some text",
"smtp_account": "some text",
"smtp_password": "some text",
"smtp_port": 1234,
"smtp_server": "some text",
"smtp_auth": true,
"imap": true,
"restrict": true,
"incoming_encryption_type": "none",
"outcoming_encryption_type": "none",
"auth_type_in": "none",
"auth_type_smtp": "none"
}