Hi I have a simple flow that send a file as an attachment by email, the mail is produced and and the file is attached but the filename is wrong, instead of file.pdf it attaches ‘file.pdf (Dec. 2, 2024, 813 a.m.)’ which is the datetime of uploading. If I download and rename to file.pdf the file opens correctly… Any solution to that?
Hi,
To understand correctly, when you process the email the date is added to the document label:
or to the document file:
Also:
- Is this using POP3 or IMAP?
- What version are you using?
Hi and thank you for the quick response!
This is the image of the file after the processing, I see no label…
I use version Version 4.8.3 Build number: v4.8.3_Fri Oct 4 01:33:39 2024 -0400 and I’m sending via SMTP handled by exchange server 2019.
I think I misunderstood. The date is attached to the file when Mayan sends the document file via email and not when Mayan receives the file from an email, correct?
I have made other tests as well with different types of documents and still the date is attached… Is there a solution on this or something I can do to help debug?
This is done to avoid filename clashes.
Since Mayan supports uploading multiple files to a single document each file needs to have a unique filename when attaching them to an email.
If you upload two files to a document and both are named file.pdf
, Mayan will accept both and manage to handle them independently even if they have the same filename. Emails on the other hand cannot handle that situation. When sending document files over email Mayan needs to append something to the filename to make it unique, the prefix that works for the most amount of use cases is the creation date.
There is not much that can be done since this is a limitation of email systems and not of Mayan itself.
OK this is due to duplicate filenames in the system?
Shouldn’t it attach the date before the file extension e.g. file(date).pdf and not file.pdf (date) ?
That would require Mayan to understand and handle file extensions which we purposely don’t do.
That is because file extensions are an issue unique to Microsoft products which they rely on the for MIME type detection instead of performing actual file introspection.
Adding special handling for an operating system or mail platform is not sustainable because we would then need to add support for all edge cases.
Just flushed all documents and from trash as well and with a single document in Mayan, the filename is still sent with the timestamp messing with the filename…
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.