本文整理了Java中javax.mail.Message.reply()
方法的一些代码示例,展示了Message.reply()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.reply()
方法的具体详情如下:
包路径:javax.mail.Message
类名称:Message
方法名:reply
[英]Get a new Message suitable for a reply to this message. The new Message will have its attributes and headers set up appropriately. Note that this new message object will be empty, that is, it will not have a "content". These will have to be suitably filled in by the client.
If replyToAll
is set, the new Message will be addressed to all recipients of this message. Otherwise, the reply will be addressed to only the sender of this message (using the value of the getReplyTo
method).
The "Subject" field is filled in with the original subject prefixed with "Re:" (unless it already starts with "Re:").
The reply message will use the same session as this message.
[中]获取适合回复此邮件的新邮件。新消息将适当设置其属性和标题。请注意,这个新消息对象将是空的,也就是说,它将没有“内容”。这些必须由客户适当填写。
如果设置了replyToAll
,新邮件将发送给此邮件的所有收件人。否则,回复将仅发送给此邮件的发件人(使用getReplyTo
方法的值)。
“主题”字段用前缀为“Re:”的原始主题填充(除非它已经以“Re:”开头)。
回复消息将使用与此消息相同的会话。
代码示例来源:origin: org.springframework.ws/spring-ws-support
@Override
protected void onSendBeforeWrite(WebServiceMessage message) throws IOException {
try {
responseMessage = requestMessage.reply(false);
responseMessage.setFrom(from);
responseBuffer = new ByteArrayOutputStream();
}
catch (MessagingException ex) {
throw new MailTransportException(ex);
}
}
代码示例来源:origin: spring-projects/spring-ws
@Override
protected void onSendBeforeWrite(WebServiceMessage message) throws IOException {
try {
responseMessage = requestMessage.reply(false);
responseMessage.setFrom(from);
responseBuffer = new ByteArrayOutputStream();
}
catch (MessagingException ex) {
throw new MailTransportException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
protected void onSendBeforeWrite(WebServiceMessage message) throws IOException {
try {
responseMessage = requestMessage.reply(false);
responseMessage.setFrom(from);
responseBuffer = new ByteArrayOutputStream();
}
catch (MessagingException ex) {
throw new MailTransportException(ex);
}
}
代码示例来源:origin: google/mail-importer
@Override
public JavaxMailMessage reply(boolean replyToAll)
throws RuntimeMessagingException {
try {
return new JavaxMailMessage(delegate.reply(replyToAll));
} catch (MessagingException e) {
throw new RuntimeMessagingException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!