Anyone using Javamailcontainer settings for Gmail?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone using Javamailcontainer settings for Gmail?

Ashish Vijaywargiya
Hello,

Probably before 1 year I have used JavaMail container settings for
gmail account without any issues.
But as I tried to use gmail settings today then I observed that it is
not working. It is giving connection timeout error.

Here is the console message:
2010-03-23 13:41:54,245 (main) [  GenericDispatcher.java:62 :INFO ]
Creating new dispatcher [JavaMailDispatcher] (main)
2010-03-23 13:41:54,264 (main) [     ServiceMcaUtil.java:91 :INFO ]
Loaded 1 Service MCA definitions from
file:/home/ashish/ofbiz_dev/testing/framework/common/servicedef/smcas_test.xml
2010-03-23 13:41:54,266 (main) [     ServiceMcaUtil.java:91 :INFO ]
Loaded 2 Service MCA definitions from
file:/home/ashish/ofbiz_dev/testing/applications/party/servicedef/mcas.xml
2010-03-23 13:41:54,269 (main) [     ServiceMcaUtil.java:91 :INFO ]
Loaded 1 Service MCA definitions from
file:/home/ashish/ofbiz_dev/testing/applications/content/servicedef/mca.xml
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException:
/opt/jdk6/jre/lib/javamail.providers (No such file or directory)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc],
com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc]}
DEBUG: Providers Listed By Protocol:
{imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc],
imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc],
pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException:
/opt/jdk6/jre/lib/javamail.address.map (No such file or directory)
DEBUG: getProvider() returning
javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: getProvider() returning
javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc]
DEBUG: mail.imap.fetchsize: 16384
2010-03-23 13:42:08,835
(org.ofbiz.service.jms.JmsListenerFactory@9ce3e0) [
JmsListenerFactory.java:74 :INFO ] JMS Listener Factory Thread
Finished; All listeners connected.

2010-03-23 13:45:03,335 (main) [  JavaMailContainer.java:188:ERROR]
Unable to connect to mail store : imaps://[hidden email] :
Connection timed out
2010-03-23 13:45:04,956 (main) [  GenericDispatcher.java:62 :INFO ]
Creating new dispatcher [oagismgr] (main)


Here is my java mail container setting from ofbiz-container.xml file:
    <container name="javamail-container"
class="org.ofbiz.service.mail.JavaMailContainer">
        <property name="delegator-name" value="default"/>
        <property name="dispatcher-name" value="JavaMailDispatcher"/>
        <property name="run-as-user" value="system"/>
        <property name="poll-delay" value="100000"/>
        <property name="delete-mail" value="false"/>
        <property name="maxSize" value="100000"/>
        <property name="default-listener" value="store-listener">
        <property name="mail.store.protocol" value="imaps"/>
        <property name="mail.host" value="gmail.com"/>
        <property name="mail.user" value="myaccount"/>
        <property name="mail.pass" value="mypassword"/>
        <property name="mail.debug" value="true"/>
        </property>
    </container>

Please let me know if anyone else in the community is using gmail
settings for Javamail to fetch all the incoming emails.
I am using trunk r924786.
Thanks!

--
Ashish
Reply | Threaded
Open this post in threaded view
|

Re: Anyone using Javamailcontainer settings for Gmail?

Ashish Vijaywargiya
Please discard my previous email.
It worked by doing following changes:

<property name="mail.host" value="imap.gmail.com"/>

--
Ashish

On Tue, Mar 23, 2010 at 1:49 PM, Ashish Vijaywargiya
<[hidden email]> wrote:

> Hello,
>
> Probably before 1 year I have used JavaMail container settings for
> gmail account without any issues.
> But as I tried to use gmail settings today then I observed that it is
> not working. It is giving connection timeout error.
>
> Here is the console message:
> 2010-03-23 13:41:54,245 (main) [  GenericDispatcher.java:62 :INFO ]
> Creating new dispatcher [JavaMailDispatcher] (main)
> 2010-03-23 13:41:54,264 (main) [     ServiceMcaUtil.java:91 :INFO ]
> Loaded 1 Service MCA definitions from
> file:/home/ashish/ofbiz_dev/testing/framework/common/servicedef/smcas_test.xml
> 2010-03-23 13:41:54,266 (main) [     ServiceMcaUtil.java:91 :INFO ]
> Loaded 2 Service MCA definitions from
> file:/home/ashish/ofbiz_dev/testing/applications/party/servicedef/mcas.xml
> 2010-03-23 13:41:54,269 (main) [     ServiceMcaUtil.java:91 :INFO ]
> Loaded 1 Service MCA definitions from
> file:/home/ashish/ofbiz_dev/testing/applications/content/servicedef/mca.xml
> DEBUG: JavaMail version 1.4ea
> DEBUG: java.io.FileNotFoundException:
> /opt/jdk6/jre/lib/javamail.providers (No such file or directory)
> DEBUG: !anyLoaded
> DEBUG: not loading resource: /META-INF/javamail.providers
> DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
> DEBUG: Tables of loaded providers
> DEBUG: Providers Listed By Class Name:
> {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
> Microsystems, Inc],
> com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
> Microsystems, Inc],
> com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
> Microsystems, Inc],
> com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
> Microsystems, Inc],
> com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
> Microsystems, Inc],
> com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
> Microsystems, Inc]}
> DEBUG: Providers Listed By Protocol:
> {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
> Microsystems, Inc],
> imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
> Microsystems, Inc],
> smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
> Microsystems, Inc],
> pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
> Microsystems, Inc],
> pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
> Microsystems, Inc],
> smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
> Microsystems, Inc]}
> DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
> DEBUG: !anyLoaded
> DEBUG: not loading resource: /META-INF/javamail.address.map
> DEBUG: java.io.FileNotFoundException:
> /opt/jdk6/jre/lib/javamail.address.map (No such file or directory)
> DEBUG: getProvider() returning
> javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
> Microsystems, Inc]
> DEBUG: mail.imap.fetchsize: 16384
> DEBUG: getProvider() returning
> javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
> Microsystems, Inc]
> DEBUG: mail.imap.fetchsize: 16384
> 2010-03-23 13:42:08,835
> (org.ofbiz.service.jms.JmsListenerFactory@9ce3e0) [
> JmsListenerFactory.java:74 :INFO ] JMS Listener Factory Thread
> Finished; All listeners connected.
>
> 2010-03-23 13:45:03,335 (main) [  JavaMailContainer.java:188:ERROR]
> Unable to connect to mail store : imaps://[hidden email] :
> Connection timed out
> 2010-03-23 13:45:04,956 (main) [  GenericDispatcher.java:62 :INFO ]
> Creating new dispatcher [oagismgr] (main)
>
>
> Here is my java mail container setting from ofbiz-container.xml file:
>    <container name="javamail-container"
> class="org.ofbiz.service.mail.JavaMailContainer">
>        <property name="delegator-name" value="default"/>
>        <property name="dispatcher-name" value="JavaMailDispatcher"/>
>        <property name="run-as-user" value="system"/>
>        <property name="poll-delay" value="100000"/>
>        <property name="delete-mail" value="false"/>
>        <property name="maxSize" value="100000"/>
>        <property name="default-listener" value="store-listener">
>        <property name="mail.store.protocol" value="imaps"/>
>        <property name="mail.host" value="gmail.com"/>
>        <property name="mail.user" value="myaccount"/>
>        <property name="mail.pass" value="mypassword"/>
>        <property name="mail.debug" value="true"/>
>        </property>
>    </container>
>
> Please let me know if anyone else in the community is using gmail
> settings for Javamail to fetch all the incoming emails.
> I am using trunk r924786.
> Thanks!
>
> --
> Ashish
>