【发布时间】:2012-09-27 02:37:04
【问题描述】:
我正在使用apache 常用邮件库发送邮件,如下
// Create the attachment
EmailAttachment attachment = new EmailAttachment();
attachment.setPath("mypictures/john.jpg");
attachment.setDisposition(EmailAttachment.ATTACHMENT);
attachment.setDescription("Picture of John");
attachment.setName("John");
// Create the email message
MultiPartEmail email = new MultiPartEmail();
email.setHostName("mail.myserver.com");
email.addTo("jdoe@somewhere.org", "John Doe");
email.setFrom("me@apache.org", "Me");
email.setSubject("The picture");
email.setMsg("Here is the picture you wanted");
// add the attachment
email.attach(attachment);
// send the email
email.send();
我想在附加文件并发送之前显示进度条..
我们该怎么做?
【问题讨论】:
-
哪个前端?你试过什么?
-
@oers 来自 Jsp pages ,我将参数发送到 servlet ,其中编写了电子邮件发送代码,如上。当代码最后一行 email.send() 执行时,根据我附加的文件大小,它需要一些时间。我想在jsp中显示进度条。
标签: java jsp email progress-bar apache-commons-email