tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Not loading smtps resource properly
Date Wed, 16 Oct 2013 12:29:34 GMT
Hi

maybe try to add src/main/resources/META-INF/javamail.address.map with:
"rfc822=smtps"

Then you surely want to set a password authenticator on the session.


*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/10/16 Tamás Kimmel <kumm0307@gmail.com>

> Hi, i'm affected too.
>
> Tested with last jdk (1.7.0_45), linux, amd64.
> Does not work with tomee 1.5.2, and even 1.6.0 snapshot.
> You can clone my test project: https://github.com/kumm/tomeemailtest.git
> I'm trying to send mail from:
>
> https://github.com/kumm/tomeemailtest/blob/master/src/main/java/trial/kumm/tomeemailtest/SendServlet.java
> in resources.xml i use smtps:
>
> https://github.com/kumm/tomeemailtest/blob/master/src/main/webapp/WEB-INF/resources.xml
>
> In the logs i see SMTPTransport used with default valies:
> DEBUG: getProvider() returning provider protocol=smtp;
> type=javax.mail.Provider$Type@78c36125;
> class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> vendor=Apache Software Foundation;version=1.0
> smtp DEBUG: Attempting plain socket connection to server localhost:25
> smtp DEBUG: Received exception -> I/O exception establishing connection
> smtp DEBUG: Exception message -> Connection refused
> java.net.ConnectException: Connection refused
>
>
>
>
> 2013/8/2 Romain Manni-Bucau <rmannibucau@gmail.com>
>
> > Hi,
> >
> > i just tested with last jdk (1.7.0_25) and it works fine
> >
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/8/1 bibhas <bibhas2@gmail.com>
> >
> > > I am using geronimo that comes with TomEE.
> > >
> > > Resource is defined as:
> > >
> > > <Resource id="mail/Default" type="javax.mail.Session">
> > >    mail.transport.protocol=smtps
> > >    mail.smtps.host=smtp.gmail.com
> > >    mail.smtps.port=465
> > >    mail.smtps.auth=true
> > >
> > >
> >
> mail.smtps.class=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport
> > >    mail.smtps.user=example@gmail.com
> > >    mail.smtps.password=password
> > > </Resource>
> > >
> > >
> > > Here is the debug log:
> > >
> > > Loading javamail.default.providers from
> > >
> > >
> >
> jar:file:/home/wasadmin/apache-tomee-jaxrs-1.5.2/lib/geronimo-javamail_1.4_mail-1.8.2.jar!/META-INF/javamail.default.providers
> > > DEBUG: loading new provider protocol=smtp,
> > > className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=smtps,
> > > className=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntp-post,
> > > className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntp-posts,
> > > className=org.apache.geronimo.javamail.transport.nntp.NNTPSSLTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntp,
> > > className=org.apache.geronimo.javamail.store.nntp.NNTPStore,
> > vendor=Apache
> > > Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntps,
> > > className=org.apache.geronimo.javamail.store.nntp.NNTPSSLStore,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=pop3,
> > > className=org.apache.geronimo.javamail.store.pop3.POP3Store,
> > vendor=Apache
> > > Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=pop3s,
> > > className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=imap,
> > > className=org.apache.geronimo.javamail.store.imap.IMAPStore,
> > vendor=Apache
> > > Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=imaps,
> > > className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: getProvider() returning provider protocol=smtp;
> > > type=javax.mail.Provider$Type@1838e17;
> > > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> > > vendor=Apache Software Foundation;version=1.0
> > > smtp DEBUG: Attempting plain socket connection to server localhost:25
> > > smtp DEBUG: Received exception -> I/O exception establishing connection
> > > smtp DEBUG: Exception message -> Connection refused
> > > java.net.ConnectException: Connection refused
> > >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> > >         at
> > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4664462.html
> > > Sent from the OpenEJB User mailing list archive at Nabble.com.
> > >
> >
>

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