Boomi

How To Send Multiple Attachments Using The Mail (IMAP) Connector

What is IMAP:

  • IMAP stands for Internet Message Access Protocol
  • It is an application layer protocol and is the most commonly used protocol for retrieving emails
  • It was designed by Mark Crispin in 1986
  • The current version of IMAP is IMAP4
  • This term is also known as Internet mail access protocol, Interactive mail access protocol, and Interim mail access protocol

What is a mail (IMAP) connector:

  • This is the connector, which is provided by the Boomi.
  • The mail (IMAP) connector allows you to get and send emails via the IMAP protocol instead of POP (Post Office Protocol)
  • The Mail (IMAP) connector can be used with any email provider that supports SMTP and IMAP protocols to perform SEND, RECEIVE, and MOVE functionalities
  • It provides more security because it uses TLS/SSL for both inbound and outbound data

Advantages of mail (IMAP) connector over standard Mail connector:

  • Take advantage of IMAP-specific functionality (e.g. the ability to retrieve emails from specific folders in a mailbox
  • Receive attachments and the email body. This is impossible with the current Mail connector which requires you to choose one or the other when retrieving emails
  • Ability to send multiple attachments, leveraging the Document Cache component
  • Specify CC and BCC email addresses when sending
  • Support transport security up to TLSv1.2 for sending email
  • Move emails from one folder to another with an explicit connector call after processing them
  • Additional query/filter options when receiving messages
  • Test the Connection option within the connection component to verify connection settings are correct quickly

Actions and Uses of Mail (IMAP) connector:

The Mail (IMAP) connector has 3 actions

  • Receive
  • Move
  • Send

RECEIVE:

  • Use the Receive action to retrieve emails into the process
  • This Mail (IMAP) connector allows you to retrieve both the email message AND any attachments.
  • When receiving an email, the email message body is sent into the process as a document but the email’s related attachments are automatically added to a document cache, indexed by the connector’s “Message-ID” document property.

MOVE:

  • Use the Move action to transfer email from one folder to another on the mail server using the Message ID
  • For example, you may want to move or “archive” a message on the mail server after successfully processing it within the atmosphere.

SEND:

  • Use the send action to send the messages to an SMTP mail server
  • This action supports sending multiple attachments through the use of the document cache.

Getting Started – Logging into the Boomi Platform

Step-1: Enter your Email Address and Password to log in to your Boomi Account

Step 2: Enter the Authorization code

Step 3: Click on Integration Service to create our process

Step 4: Click on the Create New option, then we can see the process canvas where we can build our process

Step 5: Once we click on the create a new option, we have to select the process component and it will show the below image.

Step 6: Here we can build our process

Process for Sending multiple attachments using Mail (IMAP) connector:

  • Define a unique value to identify the files that will be sent as attachments for a specific email, and ultimately relate them.
  • To illustrate this, create and set a dynamic document property using a Set Property Shape.
  • To set filenames to the attachments, we have to configure the filenames in this Set Property Shape

Step-A: Configure Set Property shape

  • It is necessary to take DDP and assign a constant value to that DDP
  • In this diagram, the DDP name is DDP_DOCUMENTID and the value of that particular DDP is static value i.e. 1. The value remains constant all the time, then only we can get the desired output

  • Before storing the documents in the Document cache, we have to specify the filename as shown in the above diagram.
  • Then this filename should be added to the particular attachments.

Step-B: Configure Document Cache Component

Add the documents into the Document Cache with only one index and key, In this example, we use a dynamic document property as the key.

  1. Index name we have to specify here
  2. Add the Dynamic Document Property key
  3. Add an alias name for easy identification

Step-C: configure set property shape 2

Set the “Attachment Cache Key” property belonging to the connector with the same value that is used as the key to store the attachments in the cache. In this example, we assign the value to the “Attachment Cache Key” property as 1

Step-D: Configuring the Mail (IMAP) Connector

Whenever we use a mail (IMAP) connector we have to configure 2 components

  1. Connection Component
  2. Operation Component

Configure Mail (IMAP) connection Component

You configure one single connection when configuring the Mail (IMAP) connection. The single connection helps to avoid any potential issues with outgoing and incoming email on the server. Also, it simplifies setup because you only have to choose the valid connection for each operation

The following image shows a sample Mail (IMAP) connection

Configuring the Mail (IMAP) Send Operation:

Attachment Cache: In this context, it is essential to specify the name of the Document Cache component, as it serves as the storage repository for all documents retrieved from the Disk

Index Name: The Index name utilized in the document cache component should be reiterated and explicitly stated in this context

Alias Name: The Alias name utilized in the document cache component should be reiterated and explicitly stated in this context

Once the process executes successfully, we will get the output to a mail as shown in the below image:

Author

Naveen Kumar

Leave a comment

Your email address will not be published. Required fields are marked *