Package org.miaixz.bus.extra.mail
Enum Class GlobalMailAccount
- All Implemented Interfaces:
Serializable,Comparable<GlobalMailAccount>,Constable
全局邮件帐户,依赖于邮件配置文件
MailAccount.MAIL_SETTING_PATHS- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescription获得邮件帐户voidsetCharset(Charset charset) 设置全局默认编码voidsetSplitLongParams(boolean splitLongParams) 设置对于超长参数是否切分为多份,默认为false(国内邮箱附件不支持切分的附件名) 注意此项为全局设置,此项会调用static GlobalMailAccountReturns the enum constant of this class with the specified name.static GlobalMailAccount[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
单例
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getAccount
获得邮件帐户- Returns:
- 邮件帐户
-
setSplitLongParams
public void setSplitLongParams(boolean splitLongParams) 设置对于超长参数是否切分为多份,默认为false(国内邮箱附件不支持切分的附件名) 注意此项为全局设置,此项会调用System.setProperty("mail.mime.splitlongparameters", true)- Parameters:
splitLongParams- 对于超长参数是否切分为多份
-
setCharset
设置全局默认编码- Parameters:
charset- 编码
-