Comments (16)
Set the javamail properties mail.debug
to true
to debug configuration problems.
from spring-integration-samples.
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.
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.
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.
This is how we should connect from the application to GMail: https://support.google.com/accounts/answer/185833?hl=en
from spring-integration-samples.
thanks a lot the probleme was in the store-uri i had to escape the '@'
from spring-integration-samples.
Glad to hear!
from spring-integration-samples.
how to escape the '@'
from spring-integration-samples.
how to escape the '@'
from spring-integration-samples.
%40
from spring-integration-samples.
Thanks a lot @garyrussell
from spring-integration-samples.
@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.
@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.
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.
please help to solve this problem
authentication faild exception
from spring-integration-samples.
@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)
- JSON or Pipe(|) based DSL for dynamic flow generation in Spring Integration HOT 1
- why @ConditionalOnBean annotation does't work well on the bean which annotated @@MessagingGateway ? HOT 1
- What is required to make DynamicTcpClientApplication also return data with the send interface? HOT 2
- Investigate Failing Test in tcp-client-server-multiplex
- SFTP delegation example HOT 8
- Only accepts one instance of multipart file not an array of multipart file HOT 7
- Add examples for using SI with Project Reactor HOT 4
- Project Structure - Reorganize in favor of JavaDSL and Reactive support HOT 12
- How to import and compile the project locally HOT 1
- Can add the sample code of mqttv5 in spring.integration.samples.basic.mqttv5? HOT 1
- How do I create multiple MQTTClients and generate messages using Spring-Integration-MQTT? HOT 1
- Why getClientInstance is used for inbound and getAsyncClientInstance is used for outbound to get synchronous and asynchronous clients. HOT 5
- Trying to find code examples on Spring Integration scatter gather HOT 3
- How to set up apply-sequence=true through xml configuration HOT 1
- Server-side logging seems to be broken HOT 2
- IMAP with OAuth 2 authentication HOT 8
- Payload Enricher with request-payload-expression="payload.username" HOT 10
- LoanBrokerSharkDetectorDemo.java:48: error: cannot find symbol HOT 1
- sftp - outbound transfer test doesn't work for embedded server HOT 6
- Sample projects to not compile with maven due to lack of <java.version/> property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-integration-samples.