commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan at WPF <stefan.at....@googlemail.com>
Subject Re: [email] Version 1.3 in SVN?
Date Sat, 25 Aug 2012 20:48:43 GMT
Hello Siegfried,

thank you for your reply. Today I finally had the chance to test 1.3.
I tried sending a mail using TLS, however I always get a tiemout, here's
the code:

>     Email email = new SimpleEmail();
>     email.setSmtpPort(465);
>     email.setAuthenticator(new DefaultAuthenticator("user", "pass"));
>     email.setDebug(false);
>     email.setHostName("host.com");
>     email.setFrom("from@host.com");
>     email.setSubject("Hi");
>     email.setMsg("This is a test mail ... :-)");
>     email.addTo("to@host.com");
>     email.setTLS(true);
>     email.send();

This gives me

> Exception in thread "main" org.apache.commons.mail.EmailException: Sending
> the email to the following server failed : host.com:465
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1189)
> at org.apache.commons.mail.Email.send(Email.java:1214)
> at Mailtest.main(Mailtest.java:26)
> Caused by: 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:1950)
> at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
> at javax.mail.Service.connect(Service.java:317)
> at javax.mail.Service.connect(Service.java:176)
> at javax.mail.Service.connect(Service.java:125)
> at javax.mail.Transport.send0(Transport.java:194)
> at javax.mail.Transport.send(Transport.java:124)
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1179)
> ... 2 more
> Caused by: java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:150)
> at java.net.SocketInputStream.read(SocketInputStream.java:121)
> at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
> at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89)
> at
> com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2188)
> ... 10 more


Also I am wondering, what is the best way to send an email using TLS?
setTLS is marked as deprecated?

Thank you very much and best regards
Stefan

2012/8/21 Siegfried Goeschl <siegfried.goeschl@it20one.at>

> Hi Stefan,
>
> the vote did not pass simply because it did not attracted enough +1s ...
> :-(
>
> Technically the 1.3 release is the current trunk or the following SVN URL
>
> https://svn.apache.org/repos/**asf/commons/proper/email/tags/**
> EMAIL_1_3_RC3<https://svn.apache.org/repos/asf/commons/proper/email/tags/EMAIL_1_3_RC3>
>
> If you give it a try it would be highly appreciated if you write a quick
> feedback (even if it worx without issues) ... ;-)
>
> Cheers,
>
> Siegfried Goeschl
>
>
> On 15.08.12 12:20, Stefan at WPF wrote:
>
>> Hello,
>>
>> I think I have read that 1.3 is already finished, just not yet released,
>> because it didn't pass the voting.
>>
>> 1) Anyone knows why it did not pass the voting? What's the problem with
>> 1.3?
>> 2) How can I find 1.3 on the SVN?
>>
>> Thanks :-)
>>
>> Best regards
>> Stefan
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@commons.**apache.org<user-unsubscribe@commons.apache.org>
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message