MimeMailMessage (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.mail.javamail

## Class MimeMailMessage

- java.lang.Object
- - org.springframework.mail.javamail.MimeMailMessage

- All Implemented Interfaces:
    MailMessage

      public class MimeMailMessage
      extends Object
      implements MailMessage

  Implementation of the MailMessage interface for a JavaMail MIME message, to let message population code interact with a simple message or a MIME message through a common interface.

  Uses a MimeMessageHelper underneath. Can either be created with a MimeMessageHelper instance or with a JavaMail MimeMessage instance.

  Since:
    1.1.5
  Author:
    Juergen Hoeller
  See Also:
    `MimeMessageHelper`, `MimeMessage`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MimeMailMessage(MimeMessage mimeMessage)` Create a new MimeMailMessage based on the given JavaMail MimeMessage.
    `MimeMailMessage(MimeMessageHelper mimeMessageHelper)` Create a new MimeMailMessage based on the given MimeMessageHelper.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MimeMessage` | `getMimeMessage()` Return the JavaMail MimeMessage that this MimeMailMessage is based on.
    `MimeMessageHelper` | `getMimeMessageHelper()` Return the MimeMessageHelper that this MimeMailMessage is based on.
    `void` | `setBcc(String bcc)`
    `void` | `setBcc(String[] bcc)`
    `void` | `setCc(String cc)`
    `void` | `setCc(String[] cc)`
    `void` | `setFrom(String from)`
    `void` | `setReplyTo(String replyTo)`
    `void` | `setSentDate(Date sentDate)`
    `void` | `setSubject(String subject)`
    `void` | `setText(String text)`
    `void` | `setTo(String to)`
    `void` | `setTo(String[] to)`

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

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

- - ### Constructor Detail

    - #### MimeMailMessage

          public MimeMailMessage(MimeMessageHelper mimeMessageHelper)

      Create a new MimeMailMessage based on the given MimeMessageHelper.
      Parameters:
        `mimeMessageHelper` - the MimeMessageHelper

    - #### MimeMailMessage

          public MimeMailMessage(MimeMessage mimeMessage)

      Create a new MimeMailMessage based on the given JavaMail MimeMessage.
      Parameters:
        `mimeMessage` - the JavaMail MimeMessage

  - ### Method Detail

    - #### getMimeMessageHelper

          public final MimeMessageHelper getMimeMessageHelper()

      Return the MimeMessageHelper that this MimeMailMessage is based on.

    - #### getMimeMessage

          public final MimeMessage getMimeMessage()

      Return the JavaMail MimeMessage that this MimeMailMessage is based on.

    - #### setFrom

          public void setFrom(String from)
                       throws MailParseException

      Specified by:
        `setFrom` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setReplyTo

          public void setReplyTo(String replyTo)
                          throws MailParseException

      Specified by:
        `setReplyTo` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setTo

          public void setTo(String to)
                     throws MailParseException

      Specified by:
        `setTo` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setTo

          public void setTo(String[] to)
                     throws MailParseException

      Specified by:
        `setTo` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setCc

          public void setCc(String cc)
                     throws MailParseException

      Specified by:
        `setCc` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setCc

          public void setCc(String[] cc)
                     throws MailParseException

      Specified by:
        `setCc` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setBcc

          public void setBcc(String bcc)
                      throws MailParseException

      Specified by:
        `setBcc` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setBcc

          public void setBcc(String[] bcc)
                      throws MailParseException

      Specified by:
        `setBcc` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setSentDate

          public void setSentDate(Date sentDate)
                           throws MailParseException

      Specified by:
        `setSentDate` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setSubject

          public void setSubject(String subject)
                          throws MailParseException

      Specified by:
        `setSubject` in interface `MailMessage`
      Throws:
        `MailParseException`

    - #### setText

          public void setText(String text)
                       throws MailParseException

      Specified by:
        `setText` in interface `MailMessage`
      Throws:
        `MailParseException`