Mail Input
    • 30 Jan 2026
    • 2 Minutes to read
    • Contributors
    • PDF

    Mail Input

    • PDF

    Article summary

    Applies to: Lasernet 11

    Used for picking up files from an email mailbox.

    Connection properties for a Mail input

    The following mail servers are supported:

    • Servers using the Internet POP3 standard.

    • Services using Internet Message Access Protocol (IMAP).

    Connection

    Protocol

    POP3 and IMAP

    Server

    DNS name or IP address of POP3 server.

    Authentication

    Select Basic authentication or OAuth2 (Microsoft application registration) authentication.

    Username

    Username for mail account.

    Password (Basic authentication only)

    Password for mail account.

    Tenant Domain (OAuth2 authentication only)

    Tenant domain of the app registration.

    Client ID (OAuth2 authentication only)

    Client ID of the app registration.

    Client secret (OAuth2 authentication only)

    Client secret of the app registration.

    Port

    Number of SSL port, if SSL is used.

    Security

    Selectable choices for security protocols are None, SSL 3.0 and TLS. Activate SSL port and set up the port number (default 465) to provide encrypted communication and secure identification. Configure the TLS protocol to use specifically version 1.0, 1.1, 1.2 or 1.3 of the protocol or configure it to negotiate with the server the use of a particular version or higher (for example, 1.2 or higher).

    Properties

    Scan Folder

    Specifies the folder to look in for incoming email. If left blank, the Inbox folder will be used.

    Note

    If specifying a mailbox subfolder in Scan Folder or Processed Mail Folder, use / (slash) as the folder separator.

    For example, Inbox/Subfoldername/

    If this does not work, try . (period) as the folder separator.

    After processing

    Specifies what happens to an email after this module processes it:

    • Mark as read in the scan folder.

    • Move the email to the folder specified by Processed Mail Folder.

    • Delete the email from the scan folder.

    Note

    Move and Delete are supported only for the IMAP protocol.

    Processed Mail Folder

    Specify a folder for mails set to move after processing.

    Process Read mails

    Activate to process incoming mails that are marked as read.

    Create Job for mail body

    Activate to create a job from the email body, if no attachment available.

    OAuth2 Configuration

    To set up OAuth2 authentication, you must complete tasks in Microsoft Entra ID and Exchange in addition to configuring this Lasernet module.

    Follow this overall process:

    1. In Entra ID, create an application registration for Lasernet and then grant it the following permissions:

      • For POP access: POP.AccessAsApp

      • For IMAP access: IMAP.AccessAsApp

      • For SMTP access: SMTP.SendAsApp

    2. In Entra ID, get tenant admin consent for the Lasernet application registration to access Exchange mailboxes through POP, IMAP, or SMTP.

    3. In Exchange, use the New-ServicePrincipal cmdlet to register the service principal.

      • Note: This step must be completed by an Exchange administrator.

    4. In Exchange, use the Add-MailboxPermission cmdlet to grant the application the necessary access to specific mailboxes.

      • For example: Add-MailboxPermission -Identity "john.smith@example.com" -User 3f2504e0-4f89-11d3-9a0c-0305e82c3301 -AccessRights FullAccess

    Note

    The process above summarises the following Microsoft documentation. For full instructions and accompanying examples, go to https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#use-client-credentials-grant-flow-to-authenticate-smtp-imap-and-pop-connections

    JobInfos

    When an email is received, a job is created for each attachment. JobData is set to the contents of the attachment, and the following JobInfos are set if available:

    Extension

    Extension of the file prefixed with a dot.

    InputAttachmentCount

    Total number of attachments included in the incoming email.

    InputAttachmentNumber

    Handling attachment number for the incoming email.

    InputBody

    The plain text content of the mail body if any.

    InputBodyHTML

    The HTML contents of the mail body if any.

    InputFromName

    The display name of the sender.

    InputFromEmail

    The email address of the sender.

    InputHeaderFieldName and InputHeaderFieldValue

    A pair of JobInfo lists that contain the names and values of the custom mail headers received by this module. Each header’s name is an item in InputHeaderFieldName. That header’s value is the corresponding item in InputHeaderFieldValue. For example, if InputHeaderFieldName[5] = X-MS-Has-Attach, the value of the X-MS-Has-Attach mail header (in this example, Yes) is in InputHeaderFieldValue[5].

    InputMimeType

    The mimetype of the attachment.

    InputFilename

    The filename of the attachment.

    InputLongFilename

    The long filename of the attachment.

    InputMessageID

    Unique identifier for the incoming mail.

    InputReplyTo

    The “reply to” address of the sender for the incoming email.

    InputSubject

    The subject of the mail.

    InputToEmail

    The email address of the receiver.

    InputToName

    The display name of the receiver.


    What's Next