public enum GlobalMailAccount extends Enum<GlobalMailAccount>
MailAccount.MAIL_SETTING_PATHS
Enum Constant and Description |
---|
INSTANCE
单例
|
Modifier and Type | Method and Description |
---|---|
MailAccount |
getAccount()
获得邮件帐户
|
void |
setCharset(Charset charset)
设置全局默认编码
|
void |
setSplitLongParams(boolean splitLongParams)
设置对于超长参数是否切分为多份,默认为false(国内邮箱附件不支持切分的附件名)
注意此项为全局设置,此项会调用 System.setProperty("mail.mime.splitlongparameters", true) |
static GlobalMailAccount |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GlobalMailAccount[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GlobalMailAccount INSTANCE
public static GlobalMailAccount[] values()
for (GlobalMailAccount c : GlobalMailAccount.values()) System.out.println(c);
public static GlobalMailAccount valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic MailAccount getAccount()
public void setSplitLongParams(boolean splitLongParams)
System.setProperty("mail.mime.splitlongparameters", true)
splitLongParams
- 对于超长参数是否切分为多份public void setCharset(Charset charset)
charset
- 编码Copyright © 2025. All rights reserved.