本文整理了Java中com.fsck.k9.mail.Address.toEncodedString()
方法的一些代码示例,展示了Address.toEncodedString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.toEncodedString()
方法的具体详情如下:
包路径:com.fsck.k9.mail.Address
类名称:Address
方法名:toEncodedString
暂无
代码示例来源:origin: k9mail/k-9
public static String toEncodedString(Address[] addresses) {
if (addresses == null) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < addresses.length; i++) {
sb.append(addresses[i].toEncodedString());
if (i < addresses.length - 1) {
sb.append(',');
}
}
return sb.toString();
}
代码示例来源:origin: k9mail/k-9
@Override
public void setSender(Address sender) {
if (sender != null) {
setHeader("Sender", sender.toEncodedString());
this.mSender = new Address[] {
sender
};
} else {
this.mSender = null;
}
}
代码示例来源:origin: k9mail/k-9
@Override
public void setFrom(Address from) {
if (from != null) {
setHeader("From", from.toEncodedString());
this.mFrom = new Address[] {
from
};
} else {
this.mFrom = null;
}
}
代码示例来源:origin: k9mail/k-9
@Override
public void setReplyTo(Address[] replyTo) {
if (replyTo == null || replyTo.length == 0) {
removeHeader("Reply-to");
mReplyTo = null;
} else {
setHeader("Reply-to", Address.toEncodedString(replyTo));
mReplyTo = replyTo;
}
}
代码示例来源:origin: k9mail/k-9
this.mTo = null;
} else {
setHeader("To", Address.toEncodedString(addresses));
this.mTo = addresses;
this.mCc = null;
} else {
setHeader("CC", Address.toEncodedString(addresses));
this.mCc = addresses;
this.mBcc = null;
} else {
setHeader("BCC", Address.toEncodedString(addresses));
this.mBcc = addresses;
this.xOriginalTo = null;
} else {
setHeader("X-Original-To", Address.toEncodedString(addresses));
this.xOriginalTo = addresses;
this.deliveredTo = null;
} else {
setHeader("Delivered-To", Address.toEncodedString(addresses));
this.deliveredTo = addresses;
this.xEnvelopeTo = null;
} else {
setHeader("X-Envelope-To", Address.toEncodedString(addresses));
this.xEnvelopeTo = addresses;
代码示例来源:origin: k9mail/k-9
private static void checkAddresses(Address[] actual, String... expected) {
for (int i = 0; i < actual.length; i++) {
assertEquals(actual[i].toEncodedString(), expected[i]);
}
assertEquals(expected.length, actual.length);
}
代码示例来源:origin: k9mail/k-9
message.setHeader("Disposition-Notification-To", from.toEncodedString());
message.setHeader("X-Confirm-Reading-To", from.toEncodedString());
message.setHeader("Return-Receipt-To", from.toEncodedString());
内容来源于网络,如有侵权,请联系作者删除!