You can achieve this by using the IMAP/POP3 Email Connector from the Mendix Marketplace. It allows your app to connect to an email inbox (like Gmail or Outlook), fetch incoming emails, and store them inside Mendix. You can also retrieve attachments and save them using a FileDocument entity.
Just configure your mail server settings (IMAP host, port, username, password, SSL), and use the RetrieveEmails Java action in a microflow or scheduled event to pull new emails automatically.
If you’re using Office 365 or Gmail, another option is to connect via the Microsoft Graph API or Gmail API, or even use automation tools like Power Automate or Zapier to push new emails into Mendix through a REST endpoint.
But for most cases, the IMAP/POP3 Email Connector is the simplest and most effective solution.