Class SmtpCommand

java.lang.Object
ch.astorm.smtp4j.protocol.SmtpCommand

public class SmtpCommand extends Object
List of SMTP commands.
  • Constructor Details

    • SmtpCommand

      public SmtpCommand(SmtpCommand.Type type, String param)
      Creates a new SmtpCommand.
      Parameters:
      type - The command type.
      param - The parameter.
  • Method Details

    • getType

      public SmtpCommand.Type getType()
      Returns the command's type.
      Returns:
      The command's type.
    • getParameter

      public String getParameter()
      Returns the command's parameter.
      Returns:
      The command's parameter.
    • parse

      public static SmtpCommand parse(String line)
      Parses the line and creates a new SmtpCommand. If line is null, this method directly returns null. In all other cases, a new SmtpCommand will be returned.
      Parameters:
      line - The SMTP line.
      Returns:
      A new SmtpCommand or null.