Email Delete

In this article

Overview

You can use this Snap to delete email messages from the IMAP server.

Snap Type

Email Archive Snap is a WRITE-type Snap that passes the data to the downstream Snap.

Prerequisites

This Snap requires a valid IMAP account to handle access to this endpoint.

Clicking the "Preview" button does not read any email message if the account is IMAP and the Unread only property is checked. When unread messages are read, they are all marked as "read" in the mail server. Therefore, they should not be read during the preview. Otherwise, the execution of the Snap does not read any message.

Test this Snap in your environment to ensure it performs as expected. This may delete emails forever, not move them to "Trash" where they could be recovered.

Support for Ultra Pipelines

Works in Ultra Pipelines

Limitations and Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min: 0

  • Max: 1

Any Document Snap

This Snap can have a most one document input view. If you do not specify an input view, the Snap generates a downstream flow of one row.

Output

Document

  • Min: 1

  • Max: 1

Any Document Snap

This Snap has exactly one output view and produces documents in the view. Each document contains a Map data which represents a deleted email message. The keys in the Document are "subject", "dateSent". The value of "subject" and "dateSent" keys is a string. The following is an example of an Output Document:

{ subject: "testing Email Sender Snap", dateSent: "Thu Mar 06 09:20:06 PST 2014" }

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon (): Indicates that you can add fields in the fieldset.

  • Remove icon (): Indicates that you can remove fields from the fieldset.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

 

Default ValueEmail Delete
ExampleEmail_Delete

String

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

 

Mail folder*

 

Default Value: None
Example: Inbox

String/Expression

Enter the name of email folder from where the Snap should delete messages.

Email Category*

 

Default ValueAll
Example: READ

Dropdown list

Select an option to choose category of emails to delete, like READ, UNREAD and ALL corresponding to read email messages, unread email messages and all messages. Please note that POP3 servers may ignore this property and the Snap deletes all messages regardless of whether this property is checked or not.

Number of messages

 

Default Value: All
Example: 100

Integer

Enter the maximum number of messages to delete from the given folder. Any non-integer or negative value will lead to "All" messages to be deleted.

From

 

Default Value: None
Example: JohnDoe

String

Specify the sender of the email. This field is used to filter email messages to delete, based on the sender name.

Subject

 

Default Value: None
Example: Important Message

String

Specify the subject of the email. This field is used to filter email messages to delete based on the specified subject.

Snap Execution

 

Default ValueExecute only
ExampleExecute only

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

 

Examples

Deleting Email from the SMTP server

This example pipeline demonstrates how to delete an email residing in the SMTP server using the SMTP account.

Step 1: Configure the Email Sender Snap to send an email to the SMTP server. On validation, the Snap displays the output with the details of the email.

 

Step 2: Configure the Email Delete Snap to delete the email with the subject testdan323. On validation, the Snap displays the output of a confirmation message indicating that the email with the Subject testdan323 is successfully deleted.

 

 

Downloads

Snap Pack History


Related Content