Email Incoming Messages

An EmailIncomingMessage is an audit log designed to track status of email to inbox uploads.

List Email Incoming Messages

SDK Method

EmailIncomingMessage.list()

Return Object

EmailIncomingMessage[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

import EmailIncomingMessage from 'files.com/lib/models/EmailIncomingMessage';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const emailIncomingMessages = await EmailIncomingMessage.list();
  for (const emailIncomingMessage of emailIncomingMessages) {
    // Operate on emailIncomingMessage
  }
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

The EmailIncomingMessage Object

Some of the methods above return a EmailIncomingMessage object. The attributes of this object are listed below.

AttributeDescription
id
int64
Id of the Email Incoming Message
inbox_id
int64
Id of the Inbox associated with this message
sender
string
Sender of the email
sender_name
string
Sender name
status
string
Status of the message
Possible values: success, partial_failure, failure, skipped
body
string
Body of the email
message
string
Message describing the failure
created_at
date-time
Message creation date/time
inbox_title
string
Title of the Inbox associated with this message