### Steps to reproduce
How can we reproduce the issue
1. Set plugin to save attachment files
2. Receive an email with attachment files that include French chars (ex : é, è) within the file name
3. Current and futur jobs won't get triggered
### Expected behaviour
Should trigger the job and shouldn't block further build
### Actual behaviour
Job won't trigger and futures jobs won't get triggered either until saved attachment with french char and email get deleted manually.
Error raised (actual file is "**Pro Intér.T16**" in the example) :
A39 OK FETCH completed.
[ERROR] - java.io.FileNotFoundException: C:\Users\A-TEST~1\AppData\Local\Temp\1487955351560-0\=?iso-8859-1?Q?**Pro_Int=E9r.T16**?= (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:162)
at javax.mail.internet.MimeBodyPart.saveFile(MimeBodyPart.java:821)
at org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.MailWrapperUtils$MessagesWrapper.saveAttachments(MailWrapperUtils.java:174)
at org.jenkinsci.plugins.pollmailboxtrigger.PollMailboxTrigger.checkForEmails(PollMailboxTrigger.java:303)
at org.jenkinsci.plugins.pollmailboxtrigger.PollMailboxTrigger.checkIfModified(PollMailboxTrigger.java:458)
at org.jenkinsci.lib.xtrigger.AbstractTrigger$Runner.run(AbstractTrigger.java:198)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
A40 CLOSE
### Server configuration
**Operating system**:
Windows Server 2012R2 x64 English
**Jenkins Version**:
2.19.2
**Plugin Version**:
1.025
**Mail Server**:
Office 365
### Additional Steps/Questions
- [x] Can you please provide all the configuration details you're using (hide sensitive fields) and any other information which may help?
# Connection configuration
storeName=imaps
# Search configuration
folder=INBOX/******
subjectContains=
#receivedXMinutesAgo=1440
# JavaMail configuration
mail.debug=true
mail.debug.auth=true
mail.imaps.host=outlook.office365.com
mail.imaps.port=993
# Office 365
mail.imap.ssl.enable=true
mail.imap.starttls.enable=true
- [X] Do you know if you're you able to connect to to your mail server via IMAP?
Yes
- [X] What log messages do you receive, when you press the "Test Connection" button?
Connecting to the mailbox...
Found properties:
- [attachments:AUTO]
- [folder:INBOX/*******]
- [host:outlook.office365.com]
- [mail.debug:true]
- [mail.debug.auth:true]
- [mail.imap.ssl.enable:true]
- [mail.imap.starttls.enable:true]
- [mail.imaps.host:outlook.office365.com]
- [mail.imaps.port:993]
- [password:***]
- [receivedXMinutesAgo:1440]
- [storeName:imaps]
- [username:*************]
Connected to mailbox. Searching for messages where:
- [flag is unread]
- [subject contains - filter not set]
- [received date is greater than '2017/02/23 11:57:35 AM']
...
Searching folder...
Found matching email(s) : 1
-*************** (2017/02/24 11:54:41 AM)
'Test connection' mode enabled - server connection skipped
Result: Success!