liveBook · Manning

Email endpoint module

As explained in Spring in Action, Sixth Edition

The email endpoint module is a Spring Integration endpoint module that provides channel adapters for receiving and sending email messages.

The email endpoint module connects Spring Integration flows to email systems through inbound and outbound channel adapters. It can be configured as Java beans or referenced through Spring Integration Java DSL methods. section 10.2.9

A practical use is an inbound flow that polls an inbox, converts each message into an application object, and passes it to a handler. Configuration properties hold the IMAP host, mailbox, credentials, and polling interval. section 10.3

Polling emailed taco orders

A Taco Cloud integration flow polls its inbox every configured interval, transforms each email into an EmailOrder containing tacos and the sender address, and posts the order to the Taco Cloud API. The application can run without a web server when configured as a non-web application.

Table 10.1 Spring Integration provides more than two dozen endpoint modules for integration with external systems. (view table figure)

Module

Dependency artifact ID (Group ID: org.springframework.integration)

AMQP

spring-integration-amqp

Application events

spring-integration-event

Atom and RSS

spring-integration-feed

Email

spring-integration-mail

Filesystem

spring-integration-file

FTP/FTPS

spring-integration-ftp

GemFire

spring-integration-gemfire

HTTP

spring-integration-http

JDBC

spring-integration-jdbc

JMS

spring-integration-jms

JMX

spring-integration-jmx

JPA

spring-integration-jpa

Kafka

spring-integration-kafka

MongoDB

spring-integration-mongodb

MQTT

spring-integration-mqtt

R2DBC

spring-integration-r2dbc

Redis

spring-integration-redis

RMI

spring-integration-rmi

RSocket

spring-integration-rsocket

SFTP

spring-integration-sftp

STOMP

spring-integration-stomp

Stream

spring-integration-stream

Syslog

spring-integration-syslog

TCP/UDP

spring-integration-ip

WebFlux

spring-integration-webflux

Web Services

spring-integration-ws

WebSocket

spring-integration-websocket

XMPP

spring-integration-xmpp

ZeroMQ

spring-integration-zeromq

ZooKeeper

spring-integration-zookeeper

Browse the endpoint-module table to compare the email module with adapters for filesystems, HTTP, Kafka, JDBC, and other external systems. section 10.2.9

How Spring in Action, Sixth Edition covers it

How deep it goes
Builds a polled IMAP flow with properties, transformation, and REST submission, but does not detail outbound email configuration.
Examples
Uses a Taco Cloud inbox, EmailProperties, EmailOrder, an IMAP inbound adapter, and an order-submission handler.
What it assumes
Assumes basic Spring Boot configuration and Java, while introducing endpoint modules, channel adapters, integration flows, and message handlers.
What you can do after
Build it from scratch using Spring Integration DSL to poll an inbox, transform messages, and submit resulting objects to an API.
How it connects
Ties channel adapters to integration flows, configuration properties, message transformers, message handlers, polling, and REST APIs.

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.