Provides methods for working with email via IMAP.
getLastEmail
Retrieves last unseen email.
** Usage example:**
Parameters:
Name | Type | Description |
---|---|---|
|
| Search for emails received since the specified amount of minutes into past. |
|
| Return email matching the specified subject. |
|
| Timeout (in milliseconds) for waiting for the message to arrive. |
Returns:
Object
- Email body, text, textAsHtml, attachments if any, and TO, FROM, SUBJECT, DATE headers.
init
Set email connection details.
Parameters:
Name | Type | Description |
---|---|---|
|
| Username (e.g. 'your@email.address'). |
|
| Password. |
|
| Host name (e.g. 'imap.gmail.com'). |
|
| Port number (e.g. 993). |
|
| true to use TLS, false otherwise. |
|
|
|
|
|
|
send
Send email using SMTP.
Parameters:
Name | Type | Description |
---|---|---|
|
| Receiver's email address. |
|
| Email subject. |
|
| Email body as a plain text. |
|
|
|
Last updated