How to eMail a file uploaded to a Webform to a sysadmin using the Rules module? I have a webform where a user can upload a file to the webform. I would like to be able to email the file via Rules to a sysadmin. I know I can send it from Webform directly, but I am also needing to attached a FillPDF file that can only be sent via Rules.
Yes it is possible to use the Rules module for sending an eMail with an attached file. To do so, make sure you have the Mail System and Mime Mail modules installed/enabled.

The Rules Event you want to use is probably when the Webform is submitted.

Then create a rule with a Rules Action to Send an HTML email. Specify the eMail body content, and then the email's attachment(s). If you have multiple attachments, make sure to specify 1 file (only) per line. The tricky part you probably run into is to correctly specify the filename of the attached files. The correct way to do so is like so:

[node:field-file-attachments:file:path]


That is also what is suggested in Comment # 25 of support issue (not bug ...) #1431572.

In your case, make sure that this path refers to the webform that is submitted and contains the attached file. Using the "Webform Rules" module, you should be able to have Rules react on an event like "Webform submitted". And if you then add a Rules Condition like "entity has field" (with the field corresponding to your attached file), you should be able to "do something" with that filename of your attachement. E.g. trigger another Rules Component that uses as a parm ... the path of your attached file. With that, your Rules Component should then take care of sending the actual eMail, with the correct value of the filename for the file to be attached.

Use Rules debugging

This question is pretty tough to answer with the limited info you provided (and without access to "your" site). Therefor I suggest you also consider 2 variations of Rules debugging, which are:


Within the rules settings, experiment a bit with the debugging facilities that come with the rules module. At least have a look at the "Rules Evaluation Log" (to check that the Rules logic being executed, actually matches what you expect that logic to be).
(Temporary) enable the Devel module, so that you can (temorary) add a Rules Action like "Display a value" (in your case of the entire node/webform that's used to submit that attached file).


For way more details about these 2 variations, refer to Rules debugging, as explained in the answer to "How can I display the value of a variable inside a condition?".