javamail

Am I allowed to use the JavaMail API for a commercial project?

The JavaMail API's license agreement is so confusing since I am not a lawyer. I want to use JavaMail for a closed-source, commercial project on the server-side of an email service, which offers email functionality to our customers. So, am I allowed to use JavaMail or do I have to pay a license fee or release my code under an open-sourc...

JavaMail stops sending mails after a while

Hello, I am currently doing a summer job as Java programmer. We have an application where people can enter their tasks, agenda, etc. The program is a client-server program, so all data is stored on a server. My boss asked me to make a mail notification system. For example, when a deadline of a task is near, it sends an email to the per...

Grails Mail plugin not working

I am trying to send mails from a Grails application, but without any success. I've used gmail and other smtp server (without ssl!) but the same error occurs: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response; nested exception is: ...

Java mail client to MS Exchange server

Our MS exchange server doesn't use Imap or pop3 protocols, I am trying to write a client in Java to connect to the exchange server, I guess I wont be able to do this with Java Mail API (if I am not wrong). I tried telnetting the exchange server address with ports 110 and 143 and 25 but with no luck. Can any one suggest if there is an exi...

JavaMail and Hotmail not working on Android

I am having trouble sending emails from a hotmail address using JavaMail. I verified that I can connect to smtp.live.com via telnet port 587. The interesting thing (to me) is if I change: host = "smtp.gmail.com" t.connect(host, username, password); It connects to Gmail just fine on the default port and sends an email. But if I ch...

How to set the NetBeans boot class path to include mail.jar?

I have a javamail app that works fine in the Android/Eclipse environment, but throws the following in NetBeans (porting Android app to Desktop): javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed boundary="----=_Part_0_7749469.1284737984291" I found a workaround here, but can't figure o...

Authenticating incoming email sender

I want to develop a system with which users interact by sending in email. Very much like most email discussion groups or like posterous. What checks should I apply to incoming email to make sure it comes from the address it claims to be? ...

html email with attachment

I'm attempting to include a zip attachment with some html content in an email using apache-commons-email 1.1. If i use this code, which sends an email without an attachment, the html body displays correctly. HtmlEmail email = new HtmlEmail(); email.setMailSession(mailSession); email.setSubject(subject); email.addTo(to); email.setFrom(f...

How to send mail via ejb 3.1 annotations based

Hi All! I am trying to inject javax.mail.session in ejb 3.1 via @Resource without any success, I believe that I miss understood the proper configurations (I want annotations based solution and not XML descriptor) I read in the new spec of JEE 6 and understand that I can used in the new JEE 6 Connector API to send mails via Message Driv...

java Mail API receiving email attachment with vietnamese characters

Recently i have follow the Sun online guide on Java Mail API to send email, download email and download attachment. When comes to extracting attachment from an email, my code looks very similar to this post http://stackoverflow.com/questions/1748183/download-attachments-using-java-mail However, i encounter a problem when the user send ...

JavaMail Email notification Failure Under AIX , Exchange 2007

Hi Everyone, [10/6/10 16:40:16:472 UTC] 0000002b SystemErr R log4j:ERROR Error occured while sending e-mail notification. [10/6/10 16:40:16:472 UTC] 0000002b SystemErr R javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client I'm getting this error when t...

dynamically create user accounts using javamail

i am developing an application,where users can sign up for an account.iam using surge mail server. i want to dynamically create user accounts (i.e through javamail api)? ...

Getting error while using JavaMail API.

HI, i am getting the error message when i am trying to send mail through java mail API. javax.mail.MessagingException: Could not connect to SMTP host: SMTPHost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect I am using this from my organization's machine and using a microsoft exchange ma...

Choosing a JavaMail "local store provider"

I'm looking at using javamail to download email/gmail using imap in a swing application. According to the FAQ on javamail http://www.oracle.com/technetwork/java/faq-135477.html#localprovs I'm going to need a "local store provider", does anyone have any recommendations or advice on ones to avoid / choose? I had presumed that I would j...

Extracting JSP page content

Hi All, I am working on a Mail API module where i have to develop a generic functionality of sending Mails with respect to various functionality in the Appliication. There is one proposed functionality where the module will expose a method which along with some required parameters will take nane of JSP template. It expects that this wi...

Javamail IMAP connection with Gmail drops after a random duration

I'm using Javamail to authenticate into gmail imap server and fetch messages headers for complete mailbox one at a time and index locally. For inboxes which have few messages, this works fine. For inboxes with messages more than 10k in general, javamail imap connection gets dropped (possibly by server). The point to note is that this dur...

gmail reply to not working with javamail

Hi I can send mails with gmail with javamail But i cannot set the reply to anyhow... the code i m using is... //the actual mail id [email protected] ccAddress = new InternetAddress( "[email protected]"); msg.setFrom(ccAddress); Address[] addresses = new Address[1]; //actually i want to addre...

What are the ways not to wait for execution of a code block or a method?

What are the correct ways/practice/implementation/strategies (or whatever we call it as) for not to wait for code block/method to finish execution in Java? Assume the following method: private void myMethod() { // Some lines of code here ..... ..... ..... anotherMethod(); // or this could be a code block ...

Javamail IMAP search by SUBJECT fails

I'm using javamail for imap search by subject on Gmail. I use the subjectTerm class to create a searchTerm object and pass to the search function. Search works fine for subject strings which are pure alphanumeric. As soon as I put in a single quote or a dash in the search string the search fails. IMAPSSLStore imapSslStore = connectToIm...

Javamail does not completely close socket on timeout

When sending a mail trough javamail, a socket to the smtp server is opened. Now, we got the case, that the connection of the mail server went down while the connection was still alive and while javamail was waiting for the server (spam scanning took a few seconds). Therefor the TCP connection was never really closed and the client deadlo...