CFIMAP and attachment with same name

Description

Hello!

I have a CFIMAP problem with attachment with equal filename (like on screenshot).

<cfimap action="getall"> give me only first attachment with name "[Untitled].pdf".

I sink problem in this code.
variable filename here is unique,

https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/mail/MailClient.java#L513

source mail have that struct

Environment

None

Attachments

3

Activity

Show:

Michael Offner 20 January 2020 at 18:40

Pothys - MitrahSoft 7 August 2019 at 14:26

I've added a fix for this issue. Now, we can get two files, if two different files as same file name

Pull request: https://github.com/lucee/Lucee/pull/734

Александр Соловьев 1 August 2019 at 06:39

Hello!

I make a test.

send mail like this

 

 

then get mail like this

 

 

You will see dump only with first attach and only one attach in the attachmentpath

in my outlook you will see correct mail

 

Pothys - MitrahSoft 26 July 2019 at 14:34

Hi ,

I"ve four files in one of the mail. All are image files & totally different images. Two of the images have the name as boss.png & another two images have named as test.jpg.
Sure all the four images are totally different. This is my test code

When I executed this code, it returns the all the mail details as query format & the attachments are placed into the folder specified in attachmentPath attribute with the uniques names with the help of generateuniquefilenames attribute. Never loss the attachments. Dump of the query also shows the details as expected.

Could you please check with that & also provide some more details ASAP. It'll improve the status of this ticket.

Александр Соловьев 9 May 2019 at 12:43

Hi!

generateuniquefilenames=true didn’t help. cfmail return first attachment always.

Please look ay the code by my link in issue. generateuniquefilenames not processing there. Nounique filename ignored by the rule ArrayUtil.find(attachments, filename)in the array arrachments

generateuniquefilenames generate unique name only of the file, but not attach name. It’s a problem.

 

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 12 April 2019 at 11:30
Updated 8 May 2020 at 18:48
Resolved 20 January 2020 at 18:40