From users-return-13874-apmail-tomee-users-archive=tomee.apache.org@tomee.apache.org Wed Oct 16 12:30:23 2013 Return-Path: X-Original-To: apmail-tomee-users-archive@www.apache.org Delivered-To: apmail-tomee-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CF627100A2 for ; Wed, 16 Oct 2013 12:30:23 +0000 (UTC) Received: (qmail 59638 invoked by uid 500); 16 Oct 2013 12:30:23 -0000 Delivered-To: apmail-tomee-users-archive@tomee.apache.org Received: (qmail 59419 invoked by uid 500); 16 Oct 2013 12:30:23 -0000 Mailing-List: contact users-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tomee.apache.org Delivered-To: mailing list users@tomee.apache.org Received: (qmail 59411 invoked by uid 99); 16 Oct 2013 12:30:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2013 12:30:21 +0000 X-ASF-Spam-Status: No, hits=3.8 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rmannibucau@gmail.com designates 209.85.216.47 as permitted sender) Received: from [209.85.216.47] (HELO mail-qa0-f47.google.com) (209.85.216.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2013 12:30:15 +0000 Received: by mail-qa0-f47.google.com with SMTP id k15so4227746qaq.13 for ; Wed, 16 Oct 2013 05:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=4K6zpBSBNCeiH6Zkj7Cezkf87yjbrj07D6iyEgA/mtI=; b=LKvh8NMEZc3ZwaPty420yh8TIvfDI/ZvqVuKTeEwm+/bEl52IZExgGw9GqKjqHyfVm DisZjyell+c9Vw+vnA5E4ZOD/d6MWuZBra8WSgMPs1wMfGOG00de0eqgfBlPkoUHFxU4 3SM4jZ0RTPq9RXI9HqMQpWq+yczXJP1k5qA9JkL2rJZHjid8LZqiNQuKQx/cBq4xBF1X r36M8INCIz+0hSeb422y5AImlZNPR6LdJKlrxCuS5/a4HzBca35qZKO4apH3CH1RICD3 nPusrxJtZcXUlKRdtVEZ9qc0e1ZgGGZ0vBaYQDEYJKYKcTk7hmFDPhAofCb2N7I6mIyk 42vw== X-Received: by 10.229.64.66 with SMTP id d2mr3396205qci.4.1381926594600; Wed, 16 Oct 2013 05:29:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.41.99 with HTTP; Wed, 16 Oct 2013 05:29:34 -0700 (PDT) In-Reply-To: References: <1375324534300-4664442.post@n4.nabble.com> <1375364989791-4664449.post@n4.nabble.com> <1375379841010-4664462.post@n4.nabble.com> From: Romain Manni-Bucau Date: Wed, 16 Oct 2013 14:29:34 +0200 Message-ID: Subject: Re: Not loading smtps resource properly To: "users@tomee.apache.org" Content-Type: multipart/alternative; boundary=001a11c1f2aac6e5cd04e8dadbdf X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1f2aac6e5cd04e8dadbdf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi maybe try to add src/main/resources/META-INF/javamail.address.map with: "rfc822=3Dsmtps" Then you surely want to set a password authenticator on the session. *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/* *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/10/16 Tam=E1s Kimmel > 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/kum= m/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=3Dsmtp; > type=3Djavax.mail.Provider$Type@78c36125; > class=3Dorg.apache.geronimo.javamail.transport.smtp.SMTPTransport; > vendor=3DApache Software Foundation;version=3D1.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 > > > Hi, > > > > i just tested with last jdk (1.7.0_25) and it works fine > > > > > > *Romain Manni-Bucau* > > *Twitter: @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 > > > > > I am using geronimo that comes with TomEE. > > > > > > Resource is defined as: > > > > > > > > > mail.transport.protocol=3Dsmtps > > > mail.smtps.host=3Dsmtp.gmail.com > > > mail.smtps.port=3D465 > > > mail.smtps.auth=3Dtrue > > > > > > > > > mail.smtps.class=3Dorg.apache.geronimo.javamail.transport.smtp.SMTPSTrans= port > > > mail.smtps.user=3Dexample@gmail.com > > > mail.smtps.password=3Dpassword > > > > > > > > > > > > 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=3Dsmtp, > > > className=3Dorg.apache.geronimo.javamail.transport.smtp.SMTPTransport= , > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dsmtps, > > > className=3Dorg.apache.geronimo.javamail.transport.smtp.SMTPSTranspor= t, > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dnntp-post, > > > className=3Dorg.apache.geronimo.javamail.transport.nntp.NNTPTransport= , > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dnntp-posts, > > > className=3Dorg.apache.geronimo.javamail.transport.nntp.NNTPSSLTransp= ort, > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dnntp, > > > className=3Dorg.apache.geronimo.javamail.store.nntp.NNTPStore, > > vendor=3DApache > > > Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dnntps, > > > className=3Dorg.apache.geronimo.javamail.store.nntp.NNTPSSLStore, > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dpop3, > > > className=3Dorg.apache.geronimo.javamail.store.pop3.POP3Store, > > vendor=3DApache > > > Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dpop3s, > > > className=3Dorg.apache.geronimo.javamail.store.pop3.POP3SSLStore, > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dimap, > > > className=3Dorg.apache.geronimo.javamail.store.imap.IMAPStore, > > vendor=3DApache > > > Software Foundation, version=3D1.0 > > > DEBUG: loading new provider protocol=3Dimaps, > > > className=3Dorg.apache.geronimo.javamail.store.imap.IMAPSSLStore, > > > vendor=3DApache Software Foundation, version=3D1.0 > > > DEBUG: getProvider() returning provider protocol=3Dsmtp; > > > type=3Djavax.mail.Provider$Type@1838e17; > > > class=3Dorg.apache.geronimo.javamail.transport.smtp.SMTPTransport; > > > vendor=3DApache Software Foundation;version=3D1.0 > > > smtp DEBUG: Attempting plain socket connection to server localhost:25 > > > smtp DEBUG: Received exception -> I/O exception establishing connecti= on > > > 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-t= p4664442p4664462.html > > > Sent from the OpenEJB User mailing list archive at Nabble.com. > > > > > > --001a11c1f2aac6e5cd04e8dadbdf--