Easy to do, just use the headers method from your ActionMailer subclass
Per the email spec, start your non-standard headers with an X-
Eg X-enquiry-num, not enquiry-num
Also, don't count on the header not being stripped at some point in the mail transport/delivery/reply process. They usually get through, but not always.
Another way to do it: add you enquiry number to your From and Reply-To addresses. Use the + sign so the main part of the address will be valid. Eg Reply-To: [email protected]
-- A valid email address of [email protected] can have a + added and the mail will still be delivered to the same mailbox. Eg the same mailbox is used for [email protected], [email protected], [email protected]
Your sw that automatically reads and handles the incoming mail can view the complete To address and handle appropriately.
This technique is often used for automatically handling bounce messages send to a mailing list--emails are sent individually to everyone on the list with the person_id included as part of the reply-to and from addresses. That way the mailing list sw can automatically figure out which addresses bounced.