Class Mailer

java.lang.Object
org.deltava.mail.Mailer

public class Mailer extends Object
A utility class to send e-mail messages.
Since:
1.0
Version:
11.1
Author:
Luke
  • Constructor Details

    • Mailer

      public Mailer(EMailAddress from)
      Initializes the mailer with a source address.
      Parameters:
      from - the source address
  • Method Details

    • setAttachment

      public void setAttachment(javax.activation.DataSource ds)
      Attaches a file to the message.
      Parameters:
      ds - a DataSource pointing to the file attachment data.
    • setContext

      public void setContext(MessageContext ctx)
      Sets the messaging context used to generate e-mail messages.
      Parameters:
      ctx - the messaging context
    • send

      public void send(EMailAddress addr)
      Adds an individual address to the recipient list, and sends the message in a new thread.
      Parameters:
      addr - the recipient name/address
    • setCC

      public void setCC(EMailAddress addr)
      Adds an individual to the CC list of this message.
      Parameters:
      addr - the recipient name/address
    • send

      public void send(Collection<? extends EMailAddress> addrs)
      Adds a group of addresses to the recipient list, and sends the message in a new thread.
      Parameters:
      addrs - a Collection of recipient names/addresses