- 09 Mar 2025
- 4 Minutes to read
- Print
- DarkLight
Get Email
- Updated on 09 Mar 2025
- 4 Minutes to read
- Print
- DarkLight
Step Details | |
Introduced in Version | --- |
Last Modified in Version | 8.17.0 |
Location | Communication > Email |
The retrieval of messages from a mail server in a Flow becomes possible through the combined use of the Get Email step and the Get Headers step. These messages can be conveniently displayed as a list on a Form or utilized for various purposes. The retrieval process is supported for both IMAP and POP servers, offering versatility in accessing email data within the Flow.
Properties
Gmail
Property | Description | Data Type |
---|---|---|
Use Recent Flag | Using pop with Gmail will not retrieve all messages. Using the recent flag will get Gmail to return messages from the last 30 days. Note: The "Use Recent Flag" setting must be used on BOTH the "Get Email" step and the "Get Headers" step to return the most recent emails; if Use Recent Flag is enabled on the "Get Header" step but not enabled on the "Get Email" step, then it will return no emails found. | Boolean |
Output Settings
Property | Description | Data Type |
---|---|---|
Mail Type Output | This property allows the user to download the email as either an MSG (.msg) or MIME (.eml) type file. |
Inputs
Property | Description | Data Type |
---|---|---|
Folder | Name of the Folder the emails are located in. (Inbox, Spam, Trash, etc.) | String |
Inline Images as Attachments | Adds images that are inline in an email as an attachment. | Boolean |
OAuth Token | Allows a user to specify the IMAP or POP3 email server token. (Requires: email account configured for OAuth and POP3 or IMAP; OAuth Provider and Token for POP3 or IMAP). | String |
Password | The password of the user connecting to the email server. | String |
Port | Port number of the email server. | Int32 |
Secure Connection | Used if the email server credentials require a secure connection (must be true when using OAuth for POP3 or IMAP). | Boolean |
Server | IMAP or POP email server. | String |
Unique ID | The Get Email step uses a Unique ID to retrieve the full message from an Email. This field assumes that previous steps may output more than one Message Header to get a certain message category. | String |
Use OAuth | Specifies the use of OAuth authentication. | Boolean |
Username | Username to connect to the email server. | String |
Outputs
Property | Description | Data Type |
---|---|---|
Found | Email Message |
Error connecting to IMAP server 'number' by port 'number'. SSL = False
The exception message indicates that there is an issue connecting to the IMAP/POP server with the given configuration. To resolve this, follow these steps:
- Double-check Server and Port Settings
- Enable SSL (Secure Socket Layer)
- Check Network and Firewall Settings
- Verify Credentials
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Email 1[GetEmail] in flow [Display Steps]: Error connecting to imap server '123' by port '143'. SSL = False
---> DecisionsFramework.LoggedException: Error connecting to imap server '123' by port '143'. SSL = False
---> System.ArgumentException: Hostname is invalid. (Parameter 'serverName'
at Rebex.Net.Imap.lcdhv(String p0, Int32 p1, TlsParameters p2, SslMode p3
at Rebex.Net.Imap.Connect(String serverName, Int32 serverPort
at DecisionsFramework.ServiceLayer.Services.Email.ImapPop3Utility.OpenImapConnection(ConnectionData conn)
--- End of inner exception stack trace --- at DecisionsFramework.ServiceLayer.Services.Email.ImapPop3Utility.OpenImapConnection(ConnectionData conn
at DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.BaseImapStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Example Use Case
Using the Get Email step alongside the Get Headers step, a Flow can retrieve messages from a mail server. Messages can be displayed as a list on a Form or used in other ways and be retrieved from either an IMAP or POP server.
The following example will retrieve a specific message from a Gmail account and display the list in a Form using IMAP. This example can also work for a POP mail server, replacing the IMAP steps with its POP equivalent.
- In a Designer Folder, create a new Flow.
- In the Toolbox, expand Communication > Email > IMAP and select the Get Headers step, and add it to the workspace.
- On the Properties tab for the Get Headers step, enter "10" for the Count field, the appropriate Username, and Password, enter "993" for Port, enter "imap.gmail.com" for Server, and select the checkbox for Secure Connection.
- In the Toolbox, navigate to Communication > Email > IMAP. and add the Get Email step to the workspace.
- On the Properties tab for the Get Email step, map the same Gmail Server credentials to the inputs. For Unique Id, map Headers.All UniqueId.First.
The Get Email step uses a Unique Id to retrieve the full message from an Email. This field works on the assumption that previous steps may output more than one Message Header to get a certain message category. - On the Found path. add a Show Form step. Connect the Not Found path to the End step.
- Select the Show Form step and create a new Form.
- Configure the Form with a Text Box Multi Line and Button control. Click Save and close the Form Designer.
- With the Show Form step selected, on the Properties panel click Unknown and select Select From Flow. Select Message as the input.
Debug
- Click Debug from the top action bar. Click START DEBUGGING. A Form displays the details of a single Message downloaded from the Gmail Account.
Step Changes
Description | Version | Release Date | Developer Task |
---|---|---|---|
Added a new property on the Get Email step for POP and IMAP. This property allows the user to download the email as either an MSG (.msg) or MIME (.eml) type file. | 8.13 | August 2023 | [DT-037903] |
Added new property "Use Recent Flag" for the Get Email Step. | 8.17 | December 2023 | [DT-038377] |
Forum Posts:
How To Have Get Emails Step Filter Specific Folder