Class LocalPart


  • public class LocalPart
    extends Object
    LocalPart contains the local part of a forward path (usually a mailbox) which appeared as the recipient in an RCPT command submitted by an SMTP client, for example "john" if the recipient was john@example.com. An SMTP server must preserve the case of its characters, it must not assume that the corresponding mailbox name is case insensitive. However, a mailbox name should indeed be case insensitive.
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalPart​(String escapedText)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String displayableName()
      Returns the unescaped mailbox name, which means that escaping constructs are replaced by their represented value.
      String smtpText()
      Returns the escaped / quoted local-part string as received from the remote SMTP client.
      String toString()
      The same as displayableName().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LocalPart

        public LocalPart​(String escapedText)
    • Method Detail

      • displayableName

        public String displayableName()
        Returns the unescaped mailbox name, which means that escaping constructs are replaced by their represented value. For example if the raw string received is "Joe\,Smith", then this function returns "Joe,Smith", without the quotes. However, unescaping is not implemented currently, this function simply returns the raw text.
      • smtpText

        public String smtpText()
        Returns the escaped / quoted local-part string as received from the remote SMTP client.
      • toString

        public String toString()
        The same as displayableName().
        Overrides:
        toString in class Object