Class JKMailInfo

java.lang.Object
com.jk.core.mail.JKMailInfo

public class JKMailInfo extends Object
This class provides the necessary method and attributes needed for the JKMailInfo objects
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method adds an attachment to the collection of attachments to this mail.
    void
    fillEmail(org.apache.commons.mail.MultiPartEmail email)
    This method fills the data from the provided MultiPartEmail into this JKMailInfo object.
    This method gets this mail BCC.
    This method gets this mail CC.
    This method gets who the sender of the mail is.
    This method gets the host.
    This method gets the message.
    int
    This method gets the SMTP port.
    This method gets the mail subject.
    This method gets the receiver of the mail.
    This method gets the user name.
    boolean
    This method checks whether the mail requires authentication or not.
    boolean
    This method check whether this mail is secured or not.
    void
    This method sets the mail BCC to the provided value.
    void
    This method sets the mail CC to the provided value.
    void
    This method sets the sender to the provided value.
    void
    This method sets the host to the provided value.
    void
    This method sets the mail message to the provided value.
    void
    setPassword(String password)
    This method sets the password to the specified value.
    void
    setRequiresAuthentication(boolean requiresAuthentication)
    This method specify whether this mail requires authentication or not.
    void
    setSecured(boolean secured)
    This method specify whether this mail is secure or not.
    void
    setSmtpPort(int smtpPort)
    This method sets the SMTP port to the provided value.
    void
    setSubject(String subject)
    This method sets the mail subject to the provided value.
    void
    This method sets the mail receiver to the provided value.
    void
    setUsername(String username)
    This method sets the user name to the provided value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JKMailInfo

      public JKMailInfo()
  • Method Details

    • addAttachment

      public void addAttachment(Attachment attachment)
      This method adds an attachment to the collection of attachments to this mail.
      Parameters:
      attachment - Specifies the attachment to be added.
    • fillEmail

      public void fillEmail(org.apache.commons.mail.MultiPartEmail email) throws org.apache.commons.mail.EmailException, IOException
      This method fills the data from the provided MultiPartEmail into this JKMailInfo object.

      This method changes the host name, SMTP port, SSL SMTP port, receiver, sender, subject, message, BCC, CC and whether this mail is secured, requires Authentication or not.

      Parameters:
      email - Specifies the email information to be replaced in this JKMailInfo object.
      Throws:
      org.apache.commons.mail.EmailException - if a checked error occurs in commons-email.
      IOException - if an I/O exception has occurred.
    • getSmtpPort

      public int getSmtpPort()
      This method gets the SMTP port.
      Returns:
      the SMTP port.
    • setSmtpPort

      public void setSmtpPort(int smtpPort)
      This method sets the SMTP port to the provided value.
      Parameters:
      smtpPort - Specifies the new SMTP port.
    • isRequiresAuthentication

      public boolean isRequiresAuthentication()
      This method checks whether the mail requires authentication or not.
      Returns:
      true, if it requires authentication, false otherwise.
    • setRequiresAuthentication

      public void setRequiresAuthentication(boolean requiresAuthentication)
      This method specify whether this mail requires authentication or not.
      Parameters:
      requiresAuthentication - Specifies whether this mail requires authentication or not.
    • getUsername

      public String getUsername()
      This method gets the user name.
      Returns:
      the user name.
    • setUsername

      public void setUsername(String username)
      This method sets the user name to the provided value.
      Parameters:
      username - Specifies the new user name.
    • setPassword

      public void setPassword(String password)
      This method sets the password to the specified value.
      Parameters:
      password - Specifies the new password.
    • getFrom

      public String getFrom()
      This method gets who the sender of the mail is.
      Returns:
      the sender of the mail.
    • getHost

      public String getHost()
      This method gets the host.
      Returns:
      the host.
    • getMsg

      public String getMsg()
      This method gets the message.
      Returns:
      the message.
    • getSubject

      public String getSubject()
      This method gets the mail subject.
      Returns:
      the mail subject.
    • getTo

      public String getTo()
      This method gets the receiver of the mail.
      Returns:
      the receiver of the mail.
    • setFrom

      public void setFrom(String from)
      This method sets the sender to the provided value.
      Parameters:
      from - Specifies the new sender.
    • setHost

      public void setHost(String host)
      This method sets the host to the provided value.
      Parameters:
      host - Specifies the new host.
    • setMsg

      public void setMsg(String msg)
      This method sets the mail message to the provided value.
      Parameters:
      msg - Specifies the new mail message.
    • setSubject

      public void setSubject(String subject)
      This method sets the mail subject to the provided value.
      Parameters:
      subject - Specifies the new subject.
    • setTo

      public void setTo(String to)
      This method sets the mail receiver to the provided value.
      Parameters:
      to - Specifies the new receiver.
    • isSecured

      public boolean isSecured()
      This method check whether this mail is secured or not.
      Returns:
      true, if is secured, false otherwise.
    • setSecured

      public void setSecured(boolean secured)
      This method specify whether this mail is secure or not.
      Parameters:
      secured - Specify whether this mail is secure or not.
    • getCc

      public String getCc()
      This method gets this mail CC.
      Returns:
      the mail CC.
    • setCc

      public void setCc(String cc)
      This method sets the mail CC to the provided value.
      Parameters:
      cc - Specifies the new mail CC.
    • getBcc

      public String getBcc()
      This method gets this mail BCC.
      Returns:
      the mail BCC.
    • setBcc

      public void setBcc(String bcc)
      This method sets the mail BCC to the provided value.
      Parameters:
      bcc - Specifies the new mail BCC.