本文整理了Java中javax.mail.internet.MimeMessage.getHeaderName()
方法的一些代码示例,展示了MimeMessage.getHeaderName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeMessage.getHeaderName()
方法的具体详情如下:
包路径:javax.mail.internet.MimeMessage
类名称:MimeMessage
方法名:getHeaderName
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception AddressException if the attempt to parse the
* addresses String fails
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @since JavaMail 1.2
*/
public void addRecipients(Message.RecipientType type, String addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses != null && addresses.length() != 0)
addHeader("Newsgroups", addresses);
} else
addAddressHeader(getHeaderName(type),
InternetAddress.parse(addresses));
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception AddressException if the attempt to parse the
* addresses String fails
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @since JavaMail 1.2
*/
public void addRecipients(Message.RecipientType type, String addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses != null && addresses.length() != 0)
addHeader("Newsgroups", addresses);
} else
addAddressHeader(getHeaderName(type),
InternetAddress.parse(addresses));
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Set the specified recipient type to the given addresses.
* If the address parameter is <code>null</code>, the corresponding
* recipient field is removed.
*
* @param type Recipient type
* @param addresses Addresses
* @exception AddressException if the attempt to parse the
* addresses String fails
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @see #getRecipients
* @since JavaMail 1.2
*/
public void setRecipients(Message.RecipientType type, String addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses == null || addresses.length() == 0)
removeHeader("Newsgroups");
else
setHeader("Newsgroups", addresses);
} else
setAddressHeader(getHeaderName(type),
addresses == null ? null : InternetAddress.parse(addresses));
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Set the specified recipient type to the given addresses.
* If the address parameter is <code>null</code>, the corresponding
* recipient field is removed.
*
* @param type Recipient type
* @param addresses Addresses
* @exception AddressException if the attempt to parse the
* addresses String fails
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @see #getRecipients
* @since JavaMail 1.2
*/
public void setRecipients(Message.RecipientType type, String addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses == null || addresses.length() == 0)
removeHeader("Newsgroups");
else
setHeader("Newsgroups", addresses);
} else
setAddressHeader(getHeaderName(type),
addresses == null ? null : InternetAddress.parse(addresses));
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: camunda/camunda-bpm-platform
return (s == null) ? null : NewsAddress.parse(s);
} else
return getAddressHeader(getHeaderName(type));
代码示例来源:origin: com.sun.mail/javax.mail
return (s == null) ? null : NewsAddress.parse(s);
} else
return getAddressHeader(getHeaderName(type));
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Set the specified recipient type to the given addresses.
* If the address parameter is <code>null</code>, the corresponding
* recipient field is removed.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @see #getRecipients
*/
public void setRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses == null || addresses.length == 0)
removeHeader("Newsgroups");
else
setHeader("Newsgroups", NewsAddress.toString(addresses));
} else
setAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Set the specified recipient type to the given addresses.
* If the address parameter is <code>null</code>, the corresponding
* recipient field is removed.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @see #getRecipients
*/
@Override
public void setRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses == null || addresses.length == 0)
removeHeader("Newsgroups");
else
setHeader("Newsgroups", NewsAddress.toString(addresses));
} else
setAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception AddressException if the attempt to parse the
* addresses String fails
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @since JavaMail 1.2
*/
public void addRecipients(Message.RecipientType type, String addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses != null && addresses.length() != 0)
addHeader("Newsgroups", addresses);
} else
addAddressHeader(getHeaderName(type),
InternetAddress.parse(addresses));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception AddressException if the attempt to parse the
* addresses String fails
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException
* @since JavaMail 1.2
*/
public void addRecipients(Message.RecipientType type, String addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses != null && addresses.length() != 0)
addHeader("Newsgroups", addresses);
} else
addAddressHeader(getHeaderName(type), InternetAddress.parse(addresses));
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException
*/
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException
*/
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Add the given addresses to the specified recipient type.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public void addRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
String s = NewsAddress.toString(addresses);
if (s != null)
addHeader("Newsgroups", s);
} else
addAddressHeader(getHeaderName(type), addresses);
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Set the specified recipient type to the given addresses.
* If the address parameter is <code>null</code>, the corresponding
* recipient field is removed.
*
* @param type Recipient type
* @param addresses Addresses
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* of existing values
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
* @see #getRecipients
*/
@Override
public void setRecipients(Message.RecipientType type, Address[] addresses)
throws MessagingException {
if (type == RecipientType.NEWSGROUPS) {
if (addresses == null || addresses.length == 0)
removeHeader("Newsgroups");
else
setHeader("Newsgroups", NewsAddress.toString(addresses));
} else
setAddressHeader(getHeaderName(type), addresses);
}
内容来源于网络,如有侵权,请联系作者删除!