Moogsoft Docs

Email LAM Reference

This is a reference for the Email LAM. and UI integration The Email LAM configuration file is located at $MOOGSOFT_HOME/config/email_lam.conf.

The following properties are unique to the Email LAM and UI integration.

See the LAM and Integration Reference for a full description of all common properties used to configure LAMs and UI integrations.

protocol

Protocol used to access email on a remote web server from a local client. Can be IMAP or POP3 (email protocols) or IMAPS or POP3S (SSL protocols). If you are using an SSL-secured protocol,provide SSL certificate details using the properties below.

Type: String

Required: Yes

One of: IMAP, POP3, IMAPS, POP3S

Default: "IMAP"

host

IP address or host name of the mail server.

Type: String

Required: Yes

Default: "localhost"

port

Port of the mail server.

Type: Integer

Required: Yes

Default: 143 for IMAP, 110 for POP3, 993 for IMAPS, 995 for POP3S

folder_path

Name of the folder containing the email messages.

Type: String

Required: Yes

Default: "INBOX"

username

Username of the account used to connect to your mail server.

Type: String

Required: Yes

Default: N/A

password

Password of the account used to connect to your mail server.

Type: String

Required: If you are not using encrypted_password

Default: N/A

encrypted_password

If you are using an encrypted password to connect to your mail server, enter it into this field and comment the password field. The encrypted_password property overrides password.

Type: String

Required: If you are not using password

Default: N/A

retrieve

Specifies whether to receive all email messages or only unread messages.

Type: String

Required: Yes

One of: UNREAD, ALL

Default: "UNREAD"

retrieve_filter

Specifies one or more filters to limit the email messages to retrieve. The Email LAM concatenates field-level filters with the AND operator. For example, if you set a "To" filter and a "From" filter, a message must match both fields to meet the filter criteria. For each field, you can specify multiple values that the Email LAM joins with an OR operator. For example, if you set two email addresses for the "To" field, the message can match one or the other to meet the filter criteria.

Type: String

Required: No

Default: N/A

Example:

{
    to              : ["support@moogsoft.com", "support1@moogsoft.com"],
    from            : ["customer@abc.com", "customer@xyz.com"],
    #recipient      : [],
    subject         : ["Alert", "Event"],
    #body           : ""
}
to

A list of email addresses used to filter the "To" field in email messages. If multiple addresses are set, the email is retrieved if any of them match the "To" address.

Type: String:

Required: No

Default: N/A

from

A list of email addresses used to filter the "From" field in email messages. If multiple addresses are set, the email is returned if any of them match the "From" address.

Type: String

Required: No

Default: N/A

recipient

A list of email addresses used to filter the "To", "CC" and "BCC" fields in email messages. If multiple addresses are set, the email is returned if any of them match the address in "To", "CC" or "BCC".

Type: String

Required: No

Default: N/A

subject

A list of strings used to filter the subject field in email messages. The email is returned if any of the strings are found in the subject. The matching is case-insensitive.

Type: String

Required: No

Default: N/A

body

A string used to filter the body in email messages. The email is returned if the string is found in the body. The matching is case-insensitive.

Type: String

Required: No

Default: N/A

mark_as_read

Marks unread emails as read.

Type: Boolean

Required: If retrieve = UNREAD

Default: True

delete_on_retrieve

Specifies whether to delete email messages on retrieval.

Type: Boolean

Required: No

Default: False

remove_html_tags

Specifies whether to remove HTML tags from email messages.

Type: Boolean

Required: No

Default: True

treat_body_as_json

Decodes the email body into a JSON object and makes it available for mapping under the $body key. Set to true if the body of retrieved email messages contain JSON objects only.

Type: Boolean

Required: No

Default: False

javamail_debug

Enables JavaMail debug mode. Can be useful when investigating problems with the POP3 or IMAP protocols and the target email server.

Type: Booean

Required: No

Default: Disabled