Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
This class provides a method that you can use to test the connection with an email server.
Value
Returns '
'
'
'
SimpleMail()
This method instantiates Use this constructor to instantiate a new empty object of the SimpleMail class object.
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
const mail = new SimpleMail(); |
checkConnection(current)
This method performs a Use this method to perform a test check with the email server , based on the configuration parameters (login, password, protocol, and others).
Parameter(s):
Name | Type | Mandatory | Default |
---|
value | |||
---|---|---|---|
current | SimpleRecord | Y | N |
Return:
Type | Description |
---|---|
Boolean |
This method returns true |
if the connection is successful; otherwise, it returns |
false |
. |
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
const current = new SimpleRecord('sys_email_account');
current.get('157425284611357796');
const mail = new SimpleMail();
if (mail.checkConnection(current)) {
ss.addInfoMessage('Сonnection successful');
} else {
ss.addErrorMessage('Connection failed');
} |
Table of Contents | ||||
---|---|---|---|---|
|