throw URISyntaxException when send email by ical4j
来源:互联网 发布:金芒网络电玩城 编辑:程序博客网 时间:2024/04/30 12:35
code:
Attendee dev = new Attendee(URI.create("mailto:" + address)); dev.getParameters().add(Role.REQ_PARTICIPANT);
exception:
<2017-02-20, 13:37:36> <WARN> <com.services.EmailServiceImpl> Unexpected Exception when send email.
java.lang.IllegalArgumentException
at java.net.URI.create(Unknown Source)
at com.service.utils.CalendarUtil.addAtendees(CalendarUtil.java:206)
at com.service.utils.CalendarUtil.getMeetingCalendar(CalendarUtil.java:170)
at com.service.shared.EmailAttachment.toBodyPart(EmailAttachment.java:114)
at com.services.EmailServiceImpl$SmtpSendEmailTask.sendMail(EmailServiceImpl.java:877)
at com.services.EmailServiceImpl$SendEmailTask.sendMailSession(EmailServiceImpl.java:607)
at com.services.EmailServiceImpl$SendEmailTask.run(EmailServiceImpl.java:640)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 20: mailto:zh@sina.com
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
... 15 more
reason:
是因为邮件有空格,构建uri的时候报错;
- throw URISyntaxException when send email by ical4j
- imap send email by python
- how to send email by jmail?
- External Send - Sending PO by email
- send email
- send email
- Email--Send
- Send Email
- send email using esmtp by windows command window
- the email title about automatic to send invoice by mail
- How can I send an email by Java application?
- Disable the Outlook warning message when send Dynamics Ax reports to email address
- mcelog: Shell Script To Send Email Alert When Hardware Errors Detected
- Send Email 发送邮件
- C# 2.0 send email
- Oracle send Email
- Send email in ABAP
- Send html Email
- python 正则表达式
- Vue.js入门-简介和指令介绍
- 虚拟机 ubuntu 16.04 修改成静态ip,以便外网访问
- vim命令图&linux命令
- 局域网发现设备代码实现:udp组播
- throw URISyntaxException when send email by ical4j
- bzoj 4292 枚举
- Monkey入门
- 主设备号和次设备号
- Linux命令(38):diff
- Android Studio Execution failed for task ':app:transformClassesWithInstantRunForDebug'
- hive创建表时ascii编码与unicode编码的对应
- Spring怎样更好的用JUnit进行单元测试
- angular指令ng-xxx