显然,这是在Java中实现的。我设置了一个指向SMTP路由的camel路由,但我希望邮件的主题是动态的,并基于它接收到的输入消息
例如,主题"Line 52 is down“
电子邮件的正文没有问题,看起来也很完美。但是我似乎不能设置电子邮件的主题,它总是被认为是“没有主题”
在我使用的Camel处理器中
Message msg = exchange.getOut();
// This works perfectly
msg.setBody( "Some body stuff " + lineProblem + " and some other details
我试图在recipientList内部使用SMTP组件。
.recipientList(simple("smtps://smtp.gmail.com?username=abc@gmail.com&password=RAW(abc)&to=${header.alertTo}&subject=RAW(alert)"));
当${header.alertTo}的值只是一个电子邮件地址时,这是可行的。但是,如果是逗号分隔的地址列表,则会引发异常。
No endpoint could be found for: def@gmail.com&subject=
我使用Spring和Apache作为后台进程,用于读取电子邮件、提取附件并处理附件。
在第一个版本中,这很好。第二个版本添加了一个web服务,包括发送一个附件。现在,电子邮件附件提取有时起作用,有时却不起作用。Camel邮件绑定类的调试消息是:
No attachments to extract as content is not Multipart: com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeMultipart
我怀疑saaj MimeMultipart类用于web服务+附件,但是我们不知道为什么JavaM
我正在做一项以前从未做过的工作。
任务:监视exchange 2007上的特定邮箱收件箱。迭代所有电子邮件消息(仅电子邮件消息),进行一些处理,并移动到同一邮箱下的特定文件夹。
工作我做了
// Create the binding
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
//service.Credentials = new WebCredentials("mailbox", "password", "mailbox@somethi
因此,我可以反复浏览一组电子邮件,使用:
repeat with eachMessage in emailSelection
log content of eachMessage
set theContent to content of eachMessage
end repeat
然而,当我试图任意地选择一个,比如说集合中的第一个,我会得到一个错误。
set newContent to content of first message in emailSelection
返回:
(无法获得应用程序“邮件”的邮箱“收件箱”的邮件id 7