org.springframework.batch.sample.domain.mail.internal

## Class TestMailSender

- java.lang.Object
- - org.springframework.batch.sample.domain.mail.internal.TestMailSender

- All Implemented Interfaces:
    org.springframework.mail.MailSender

      public class TestMailSender
      extends java.lang.Object
      implements org.springframework.mail.MailSender

  Since:
    2.1
  Author:
    Dan Garrette, Dave Syer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestMailSender()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `java.util.List<org.springframework.mail.SimpleMailMessage>` | `getReceivedMessages()`
    `void` | `send(org.springframework.mail.SimpleMailMessage simpleMessage)`
    `void` | `send(org.springframework.mail.SimpleMailMessage[] simpleMessages)`
    `void` | `setSubjectsToFail(java.util.List<java.lang.String> subjectsToFail)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestMailSender

          public TestMailSender()

  - ### Method Detail

    - #### clear

          public void clear()

    - #### send

          public void send(org.springframework.mail.SimpleMailMessage simpleMessage)
                    throws org.springframework.mail.MailException

      Specified by:
        `send` in interface `org.springframework.mail.MailSender`
      Throws:
        `org.springframework.mail.MailException`

    - #### setSubjectsToFail

          public void setSubjectsToFail(java.util.List<java.lang.String> subjectsToFail)

    - #### send

          public void send(org.springframework.mail.SimpleMailMessage[] simpleMessages)
                    throws org.springframework.mail.MailException

      Specified by:
        `send` in interface `org.springframework.mail.MailSender`
      Throws:
        `org.springframework.mail.MailException`

    - #### getReceivedMessages

          public java.util.List<org.springframework.mail.SimpleMailMessage> getReceivedMessages()