Giter Club home page Giter Club logo

Comments (16)

garyrussell avatar garyrussell commented on May 31, 2024

Set the javamail properties mail.debug to true to debug configuration problems.

from spring-integration-samples.

 avatar commented on May 31, 2024
juil. 10, 2017 1:48:02 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFOS: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@311d617d: startup date [Mon Jul 10 13:48:02 GMT+01:00 2017]; root of context hierarchy
juil. 10, 2017 1:48:02 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFOS: Loading XML bean definitions from class path resource [META-INF/spring/integration/gmail-imap-idle-config.xml]
juil. 10, 2017 1:48:02 PM org.springframework.integration.config.IntegrationRegistrar registerHeaderChannelRegistry
INFOS: No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
juil. 10, 2017 1:48:02 PM org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor registerErrorChannel
INFOS: No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
juil. 10, 2017 1:48:02 PM org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor registerTaskScheduler
INFOS: No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
juil. 10, 2017 1:48:02 PM org.springframework.scheduling.concurrent.ExecutorConfigurationSupport initialize
INFOS: Initializing ExecutorService  'taskScheduler'
juil. 10, 2017 1:48:02 PM org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup start
INFOS: Starting beans in phase 0
juil. 10, 2017 1:48:02 PM org.springframework.integration.endpoint.EventDrivenConsumer logComponentSubscriptionEvent
INFOS: Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
juil. 10, 2017 1:48:02 PM org.springframework.integration.channel.AbstractSubscribableChannel adjustCounterIfNecessary
INFOS: Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@311d617d.errorChannel' has 1 subscriber(s).
juil. 10, 2017 1:48:02 PM org.springframework.integration.endpoint.AbstractEndpoint start
INFOS: started _org.springframework.integration.errorLogger
juil. 10, 2017 1:48:02 PM org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup start
INFOS: Starting beans in phase 1073741823
juil. 10, 2017 1:48:02 PM org.springframework.integration.endpoint.AbstractEndpoint start
INFOS: started customAdapter
DEBUG: JavaMail version 1.5.5
juil. 10, 2017 1:48:02 PM org.springframework.integration.channel.AbstractSubscribableChannel adjustCounterIfNecessary
INFOS: Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@311d617d.receiveChannel' has 1 subscriber(s).
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,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle]
DEBUG IMAPS: mail.imap.fetchsize: 16384
DEBUG IMAPS: mail.imap.ignorebodystructuresize: false
DEBUG IMAPS: mail.imap.statuscachetimeout: 1000
DEBUG IMAPS: mail.imap.appendbuffersize: -1
DEBUG IMAPS: mail.imap.minidletime: 10
DEBUG IMAPS: peek
DEBUG IMAPS: closeFoldersOnStoreFailure
DEBUG IMAPS: protocolConnect returning false, host=gmail.com, user=test, password=<null>
juil. 10, 2017 1:48:03 PM org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask run
AVERTISSEMENT: error occurred in idle task
javax.mail.AuthenticationFailedException: failed to connect, no password specified?

from spring-integration-samples.

 avatar commented on May 31, 2024

This is the content of the configuration file :

<int:channel id="receiveChannel" />
<!-- replace 'userid and 'password' with the real values -->
<int-mail:imap-idle-channel-adapter id="customAdapter"
		store-uri="imaps://[email protected]:[email protected]:993/inbox"
		channel="receiveChannel"
		auto-startup="true"
		should-delete-messages="false"
		should-mark-messages-as-read="false"
		java-mail-properties="javaMailProperties"/>

<util:properties id="javaMailProperties">
	<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
	<prop key="mail.imap.socketFactory.fallback">false</prop>
	<prop key="mail.store.protocol">imaps</prop>
	<prop key="mail.debug">true</prop>
</util:properties>

from spring-integration-samples.

garyrussell avatar garyrussell commented on May 31, 2024

DEBUG IMAPS: protocolConnect returning false, host=gmail.com, user=test, password=

Gmail doesn't support a java client by default; their authentication is stricter; you have to change the settings on the account - google it.

from spring-integration-samples.

artembilan avatar artembilan commented on May 31, 2024

This is how we should connect from the application to GMail: https://support.google.com/accounts/answer/185833?hl=en

from spring-integration-samples.

 avatar commented on May 31, 2024

thanks a lot the probleme was in the store-uri i had to escape the '@'

from spring-integration-samples.

artembilan avatar artembilan commented on May 31, 2024

Glad to hear!

from spring-integration-samples.

shijiebei2014 avatar shijiebei2014 commented on May 31, 2024

how to escape the '@'

from spring-integration-samples.

naren19 avatar naren19 commented on May 31, 2024

how to escape the '@'

from spring-integration-samples.

garyrussell avatar garyrussell commented on May 31, 2024

%40

HTML URL Encoding Reference.

from spring-integration-samples.

naren19 avatar naren19 commented on May 31, 2024

Thanks a lot @garyrussell

from spring-integration-samples.

TinaRanic avatar TinaRanic commented on May 31, 2024

@garyrussell @naren19 @razzeguimohamedzied Could you please show current state of "store-uri" cause I still cant get it working even with the %40.

Thanks

from spring-integration-samples.

garyrussell avatar garyrussell commented on May 31, 2024

@TinaRanic I am not sure what you mean by "current state". If your password contains special characters, e.g. @, it must be replaced with %40. If you are trying to connect to Gmail, you need to change settings on the account; see the link above.

from spring-integration-samples.

AravindPateel avatar AravindPateel commented on May 31, 2024

protected void doSend(MimeMessage[] mimeMessages, Object[] originalMessages) throws MailException {
Map<Object, Exception> failedMessages = new LinkedHashMap<Object, Exception>();
Transport transport = null;

	try {
		for (int i = 0; i < mimeMessages.length; i++) {

			// Check transport connection first...
			if (transport == null || !transport.isConnected()) {
				if (transport != null) {
					try {
						transport.close();
					}
					catch (Exception ex) {
						// Ignore - we're reconnecting anyway
					}
					transport = null;
				}
				try {
					transport = connectTransport();
				}
				catch (AuthenticationFailedException ex) {
					throw new MailAuthenticationException(ex);
				}

from spring-integration-samples.

AravindPateel avatar AravindPateel commented on May 31, 2024

please help to solve this problem
authentication faild exception

from spring-integration-samples.

garyrussell avatar garyrussell commented on May 31, 2024

@AravindPateel Please don't comment on old, closed issues.

Issues are not for asking questions.

Authentication exception means exactly that - bad user or password.

You can try enabling mail.debug in your javamail properties.

If that doesn't help, ask a question on Stack Overflow, with much more detail.

Do not comment further here.

from spring-integration-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.