Use this constructor to instantiate a new empty SimpleMail class object.
Example:
const mail = new SimpleMail(); |
Use this method performs a test check with 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 | Returns true if the connection is successful; otherwise, it returns false. |
Example:
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'); } |