# Form File Uploads in E-Mail

**URL:** <https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342>\
**Category:** Product Support\
**Created:** [March 13, 2018, 8:37am UTC](https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342 "2018-03-13T08:37:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuxchan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fuxchan/32/287_2.png) [@fuxchan](https://forum.mautic.org/u/fuxchan)\
**Post date:** [March 13, 2018, 8:37am UTC](https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342/1 "2018-03-13T08:37:40Z")

</div>

Hi,

is there a way to get the uploaded files from a form via e-mail?

The best solution would be to attach the files to the mail, but a direct link to the files would be acceptable also.  
The latter should be possible if there would be a way to get the result entry ID in the mail, but I couldn’t find one.

Thank you!

---

<div class="post-metadata">

**Author:** ![jordanhopkinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jordanhopkinson/32/297_2.png) [@jordanhopkinson](https://forum.mautic.org/u/jordanhopkinson)\
**Post date:** [July 12, 2018, 12:00pm UTC](https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342/2 "2018-07-12T12:00:59Z")

</div>

Could I get an update on this, was it fixed? I need this same functionality.

---

<div class="post-metadata">

**Author:** ![fuxchan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fuxchan/32/287_2.png) [@fuxchan](https://forum.mautic.org/u/fuxchan)\
**Post date:** [July 12, 2018, 12:56pm UTC](https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342/3 "2018-07-12T12:56:27Z")

</div>

Hi Jordan,

in the end I wrote a custom PHP script and set up a webhoook. If you are interested I could post some code snippets later.

---

<div class="post-metadata">

**Author:** ![jordanhopkinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jordanhopkinson/32/297_2.png) [@jordanhopkinson](https://forum.mautic.org/u/jordanhopkinson)\
**Post date:** [July 12, 2018, 1:22pm UTC](https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342/4 "2018-07-12T13:22:27Z")

</div>

That would be great! 🙂

It seems bizarre that you can’t just do it within the send results email because each file gets a unique link

---

<div class="post-metadata">

**Author:** ![fuxchan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fuxchan/32/287_2.png) [@fuxchan](https://forum.mautic.org/u/fuxchan)\
**Post date:** [July 13, 2018, 6:38am UTC](https://forum.mautic.org/t/form-file-uploads-in-e-mail/10342/5 "2018-07-13T06:38:30Z")

</div>

Hi Jordan,

you can find the script here: [https://gist.github.com/silsha/11b1eec219c0afdbca8ec2e242592418](https://gist.github.com/silsha/11b1eec219c0afdbca8ec2e242592418)

Note that we are using sendgrid for sending mails. I’m sure it would also be possible to send the mails directly via mautic.

Also, this only works for exactly one form (the one you specify in line 27). You also have to find the form field IDs (Line 33-36). The easiest way to do that is inspecting the field in the form editor. You should find IDs like „mauticform\_148“.

In mautic you have to set up the webhook by clicking the cog in the upper-right corner → Webhooks → New. Here you have to select the Form Submit Event and enter the url to webhook.php ([https://example.com/webhook.php](https://example.com/webhook.php)).

Hope that helps. Some PHP knowledge will be needed to get this running. Please let me know if you have any questions.
