The last event at Orchard Harvest 2012 was a hackathon. I decided to sit at a table with some folks that wanted to send attachments with Orchard. In this particular case, the email action was already being triggered by a rule. (MailActions) However, there isn’t a built-in option for attaching files. So, we decided to build a simple module that would implement IMessageEventHandler to intercept the “Sending” event and append our attachment. Here is the result of our work…
Create Module w/ Orchard Command Line
Add a Handler to Send Our Email Attachment
This is a contrived example that just uses a hard-coded file path.
That’s it! Now any emails going out based on the email action rule will get this attachment. We didn’t get much further with this, but we started to work on parameterizing the file path based on some more rules.