Example usage for org.springframework.integration.mail.dsl Mail outboundAdapter

List of usage examples for org.springframework.integration.mail.dsl Mail outboundAdapter

Introduction

In this page you can find the example usage for org.springframework.integration.mail.dsl Mail outboundAdapter.

Prototype

public static MailSendingMessageHandler outboundAdapter(MailSender mailSender) 

Source Link

Document

A convenient factory method to produce MailSendingMessageHandler based on provided MailSender .

Usage

From source file:org.springframework.integration.samples.filesplit.Application.java

@Bean
public IntegrationFlow toMail() {
    return f -> f.handle(Mail.outboundAdapter(this.mailProperties.getHost())
            //                  .javaMailProperties(b -> b.put("mail.debug", "true"))
            .port(this.mailProperties.getPort()).credentials(this.mailProperties.getUsername(),
                    this.mailProperties.getPassword()),
            e -> e.id("mailOut").advice(afterMailAdvice()));
}