<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
	xmlns:int="http://www.springframework.org/schema/integration"
	xsi:schemaLocation="http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/mail https://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

	<int-mail:outbound-channel-adapter id="adapterWithMailSenderReference"
			order="23"
			mail-sender="mailSender"/>

	<int-mail:outbound-channel-adapter id="adapterWithPollableChannel" channel="pollableChannel"
			order="23"
			mail-sender="mailSender">
		<int:poller fixed-rate="100" max-messages-per-poll="4"/>
	</int-mail:outbound-channel-adapter>

	<int:channel id="pollableChannel">
		<int:queue/>
	</int:channel>

	<int-mail:outbound-channel-adapter id="adapterWithHostProperty"
			host="somehost" username="someuser" password="somepassword"/>

	<bean id="mailSender" class="org.springframework.integration.mail.StubJavaMailSender">
		<constructor-arg>
			<bean class="jakarta.mail.internet.MimeMessage">
				<constructor-arg type="jakarta.mail.Session"><null/></constructor-arg>
			</bean>
		</constructor-arg>
	</bean>

	<int-mail:outbound-channel-adapter id="advised"
			mail-sender="mailSender">
		<int-mail:request-handler-advice-chain>
			<bean class="org.springframework.integration.mail.config.MailOutboundChannelAdapterParserTests$FooAdvice" />
		</int-mail:request-handler-advice-chain>
	</int-mail:outbound-channel-adapter>

</beans>
