javamail

JavaMail: how to get new messages comparing with time-stamps

拟墨画扇 提交于 2019-12-21 12:01:39
问题 I'm trying to get messages after a certain time-stamp, the way I've coded it was suggested by another programmer in this site: GregorianCalendar date = new GregorianCalendar(); SearchTerm newer = new ReceivedDateTerm(ComparisonTerm.GT,date.getTime()); Message msgs[] = folder.search(newerThen); The issue is that I get all the messages since the date, not the specific time. I was wondering if there is some work-around to emulate this. I mean, for an instance, if I want to get all the messages

EMail Client Library [closed]

℡╲_俬逩灬. 提交于 2019-12-21 07:30:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm looking for a library that wraps the javamail API on the receiving side, in the same manner that Commons Email handles the sending of emails. In my perfect world the library works in the following manner: Subscribe to a mail server Notify me when an email arrives Handle attachments for me (why should I care

EMail Client Library [closed]

只愿长相守 提交于 2019-12-21 07:30:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm looking for a library that wraps the javamail API on the receiving side, in the same manner that Commons Email handles the sending of emails. In my perfect world the library works in the following manner: Subscribe to a mail server Notify me when an email arrives Handle attachments for me (why should I care

Unknown SMTP host

岁酱吖の 提交于 2019-12-21 06:26:35
问题 I am running a Java web application using tomcat to send generated reports via emails to the users. I am able to send the emails but after few hours the server stops sending emails, with the following error. javax.mail.MessagingException: Unknown SMTP host: mail.mydomain.co.uk; nested exception is: java.net.UnknownHostException: mail.mydomain.co.uk at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1970) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)

Error when sending email via Java Mail API?

我只是一个虾纸丫 提交于 2019-12-21 05:45:10
问题 I got following error when trying to send email via Java Mail API? What does this error mean? javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2210) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java

Apache James Learning Resources [closed]

房东的猫 提交于 2019-12-21 03:53:17
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . The plan is to create a list of Apache James learning resources, involving a wide a range of aspects from setting it up to using API from java. If you read this and have some great tutorial at your fingertips, please drop a line or two. I'll start with The Official Apache James Wiki an article by IBM: Working

Apache James Learning Resources [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-21 03:53:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . The plan is to create a list of Apache James learning resources, involving a wide a range of aspects from setting it up to using API from java. If you read this and have some great tutorial at your fingertips, please drop a line or two. I'll start with The Official Apache James Wiki an article by IBM: Working

Java mail, set reply-to address not working

浪子不回头ぞ 提交于 2019-12-21 03:28:24
问题 I wrote a small email sending program in java, it has from , to and reply-to address, when the client tries to reply to the mail, it should be able to reply to the reply-to address. Currently it's not working, my code is below: // File Name SendEmail.java import java.util.*; import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; public class SendEmail { public static void main(String [] args) { // Recipient's email ID needs to be mentioned. String to = "xyz@gmail.com";

What is the difference between getDefaultInstance() and getInstance() in Session class?

梦想的初衷 提交于 2019-12-20 10:32:31
问题 What is the difference between Session.getDefaultInstance(props, authenticator) and getInstance(props, authenticator) ? In general, when will you choose one over the other? I also read Java doc on getDefaultInstance(props, authenticator), but still couldn't able to make out the difference distinctly/clearly. Hope experts can help me in understanding this better. UPDATE: Actual reason that triggered to ask this question is: We've used Session.getDefaultInstance() method in some places within

Problem with subject encoding when sending an email

橙三吉。 提交于 2019-12-20 10:23:29
问题 I'm sending an email and I'm receiving it correctly but the encoding of the subject is not correct. I'm sending "invitación" but I'm receiving "invitaci?n". The content of the message is OK. The content of the message is coming from a transformation of a Velocity Template while the subject is set in a String variable. I've googled around and I've seen that some people says that MimeUtility.encodeText() could solve the problem, but I have had no success with it. How can I solve the problem?