为了账号安全,请及时绑定邮箱和手机立即绑定

如何在 Spring Integration 邮件接收适配器中设置我的 Store-Uri 时转义

如何在 Spring Integration 邮件接收适配器中设置我的 Store-Uri 时转义

慕妹3242003 2023-04-19 16:19:35
我正在使用 imapIdle 配置我的电子邮件接收通道,我的电子邮件帐户密码中包含字符“@”。我注意到代码 store-uri 中断了,因为它根据“@”字符拆分字符串。我读了 Gary Russel 的评论,他说这个角色需要逃避。我尝试通过键入“\@”来转义“@”字符,但这没有用。store-uri 字符串仍在第一个“@”字符处拆分。因此我得到我尝试用它的 unicode 表示“U+0040”替换“@”,但这也不起作用store-uri="imaps://${email.username}:${email.password.contains("@")}@outlook.office365.com"08:38:24.536 WARN  [task-scheduler-1][org.springframework.integration.mail.ImapIdleChannelAdapter] error occurred in idle taskcom.sun.mail.util.MailConnectException: Couldn't connect to host, port: PASSWORDCHARACTERSAFTER"@"SYMBOL@imap.HOSTDOMAIN, 993; timeout -1    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:740) ~[javax.mail-1.6.2.jar:1.6.2]    at javax.mail.Service.connect(Service.java:366) ~[javax.mail-api-1.6.2.jar:1.6.2]    at javax.mail.Service.connect(Service.java:246) ~[javax.mail-api-1.6.2.jar:1.6.2]    at javax.mail.Service.connect(Service.java:195) ~[javax.mail-api-1.6.2.jar:1.6.2]    at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:332) ~[spring-integration-mail-5.2.0.M2.jar:5.2.0.M2]    at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:339) ~[spring-integration-mail-5.2.0.M2.jar:5.2.0.M2]    at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:170) ~[spring-integration-mail-5.2.0.M2.jar:5.2.0.M2]    at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:289) [spring-integration-mail-5.2.0.M2.jar:5.2.0.M2]    at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:254) [spring-integration-mail-5.2.0.M2.jar:5.2.0.M2]
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 82 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信