How can I programmatically add a CSV containing all order information to order emails. By default only a PDF is attached to those emails.
I know I have to write a plugin. But I don't know which class or method I have to modify and how.