Class InternetAddressHelper

java.lang.Object
com.helger.mail.address.InternetAddressHelper

@Immutable public final class InternetAddressHelper extends Object
This class handles a single email address. It is split into an address part and an optional name. The personal name is optional and may be null.
Author:
Philip Helger
  • Method Details

    • getAsInternetAddress

      @Nonnull public static jakarta.mail.internet.InternetAddress getAsInternetAddress(@Nonnull com.helger.commons.email.IEmailAddress aAddress, @Nullable Charset aCharset) throws jakarta.mail.internet.AddressException
      Throws:
      jakarta.mail.internet.AddressException
    • getAsInternetAddress

      @Nonnull public static jakarta.mail.internet.InternetAddress getAsInternetAddress(@Nonnull String sAddress, @Nullable String sPersonal, @Nullable Charset aCharset) throws jakarta.mail.internet.AddressException
      Throws:
      jakarta.mail.internet.AddressException
    • getAsInternetAddress

      @Nonnull public static jakarta.mail.internet.InternetAddress getAsInternetAddress(@Nonnull com.helger.commons.email.IEmailAddress aAddress, @Nullable String sCharset) throws UnsupportedEncodingException, jakarta.mail.internet.AddressException
      Throws:
      UnsupportedEncodingException
      jakarta.mail.internet.AddressException
    • getAsInternetAddress

      @Nonnull public static jakarta.mail.internet.InternetAddress getAsInternetAddress(@Nonnull String sAddress, @Nullable String sPersonal, @Nullable String sCharset) throws UnsupportedEncodingException, jakarta.mail.internet.AddressException
      Throws:
      UnsupportedEncodingException
      jakarta.mail.internet.AddressException
    • getAsInternetAddressArray

      @Nonnull public static jakarta.mail.internet.InternetAddress[] getAsInternetAddressArray(@Nonnull com.helger.commons.collection.impl.ICommonsList<? extends com.helger.commons.email.IEmailAddress> aAddresses, @Nullable Charset aCharset) throws jakarta.mail.internet.AddressException
      Throws:
      jakarta.mail.internet.AddressException
    • getAsEmailAddress

      @Nullable public static com.helger.commons.email.EmailAddress getAsEmailAddress(@Nullable jakarta.mail.internet.InternetAddress aInternetAddress)
      Convert the passed InternetAddress to an EmailAddress
      Parameters:
      aInternetAddress - Source object. May be null.
      Returns:
      null if the source object is null.