CustomFields and Attachment in email

I’ve created a queue with some customs fields. I’ve used the scrip
extractCustomFieldValue to extract values of an email and automatically
fill the ticket created through this email. I verified that the email
must be sent in plain-text format in order to scrip functions correctly.

However, if an email will be sent with an attached file, the script
extractCustomFieldValue not functions, in other words, customs fields
aren’t fill from email and the ticket is created with the empty customs

How do I?