This project is read-only.

How to attach a file in the email sent by a rule

Topics: Customizing Orchard, General, Installing Orchard
Nov 19, 2012 at 6:08 PM



I just created a contact us form using custom forms, the Custom Content Type I have defined contains a 'file field' which downloads a file to a folder under the Default Media Folder.

I created a rule to send an email on the create event. This email contains a summary of the input fields.

I would appreciate to be able to attach the uploaded file to the email ?

An alternative would be to provide in the email a link to the new content created as draftable ?


Many thanks for help.


Nov 19, 2012 at 6:14 PM

You can't do that with rules without writing your own action, that would do the attachment. If a link is enough, then the token for the field should do the trick.

Nov 19, 2012 at 10:02 PM

I am struggling with the file field and the way I could extract the file name.

Moreover I have difficulties extracting the data from the Custom type I am using (CandidatForm), actually all I see working is based on the request as in 


I am unable to have something based on {Content.Fields.CandidatForm.Name} working. Should it work in a rule ?

Nov 23, 2012 at 3:20 AM

It should, yes. If you have a repro that it doesn't, please file a bug.