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

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

Hello,

 

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.

CS

Coordinator
Nov 19, 2012 at 5: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 9: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 

{Request.Form:CandidatForm.Name.Value}.

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

Coordinator
Nov 23, 2012 at 2:20 AM

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