Enum Class GlobalMailAccount

java.lang.Object
java.lang.Enum<GlobalMailAccount>
org.miaixz.bus.extra.mail.GlobalMailAccount
All Implemented Interfaces:
Serializable, Comparable<GlobalMailAccount>, Constable

public enum GlobalMailAccount extends Enum<GlobalMailAccount>
全局邮件帐户,依赖于邮件配置文件MailAccount.MAIL_SETTING_PATHS
Since:
Java 17+
Author:
Kimi Liu
  • Enum Constant Details

  • Method Details

    • values

      public static GlobalMailAccount[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GlobalMailAccount valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAccount

      public MailAccount getAccount()
      获得邮件帐户
      Returns:
      邮件帐户
    • setSplitLongParams

      public void setSplitLongParams(boolean splitLongParams)
      设置对于超长参数是否切分为多份,默认为false(国内邮箱附件不支持切分的附件名) 注意此项为全局设置,此项会调用
       System.setProperty("mail.mime.splitlongparameters", true)
       
      Parameters:
      splitLongParams - 对于超长参数是否切分为多份
    • setCharset

      public void setCharset(Charset charset)
      设置全局默认编码
      Parameters:
      charset - 编码