1
我使用Apache 常見的電子郵件庫發送電子郵件,如下進度條與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("[email protected]", "John Doe");
email.setFrom("[email protected]", "Me");
email.setSubject("The picture");
email.setMsg("Here is the picture you wanted");
// add the attachment
email.attach(attachment);
// send the email
email.send();
我想顯示進度條,直到附加文件併發送..
如何我們可以做嗎?
其前端?你有什麼嘗試?從jsp頁面 – oers
@oers,我送參數的servlet,其中電子郵件發送代碼編寫,如上述。當代碼最後一行,email.send()執行,它根據文件大小需要時間,我已附接。我想在jsp中顯示進度條。 –