The attachmentFileName is what is shown to the user, not the file on your sending computer. It should NOT have a path in it.
If you want a filename from your computer, try addFileAsAttachment.
The mimeType can be excluded if the filename has a common extension supported by the library.
The overload without mimeType was added October 28, 2024.
The parameter attachmentFileName was previously called filename. This was changed for clarity and consistency with other overloads on October 28, 2024.
The attachmentFileName is what is shown to the user, not the file on your sending computer. It should NOT have a path in it. If you want a filename from your computer, try addFileAsAttachment.
The mimeType can be excluded if the filename has a common extension supported by the library.