[Forminator Pro] File upload field sends files as an attachment in email.

0

Hi, I wonder if can I send a file as an attachment in an email when using file upload field in form? Currently, it stores the file in the server and we don’t want to do that.

  • Adam
    • Support Gorilla

    Hi Luke

    I hope you’re well today and thank you for your question!

    Currently only a link to an uploaded file can be attached. The file must be uploaded to the server anyway to be able to do anything with that – including sending it in an e-mail – so that’s the step that can’t be avoided but after that it should be possible to include it in e-mail and remove after it’s send.

    It’s not implemented in the plugin but I’ve already asked our developers for help so they’ll look into it. Please keep an eye on this ticket and we’ll update you here as soon as we get more information/solution for you.

    Best regards,

    Adam

  • Tho Bui
    • SLS

    Hi Luke,

    I hope you’re well today!

    I have prepared a custom snippet which you can use as a guide here :

    https://gist.github.com/wpmudev-sls/7a32dc5407324cc902f8b9ad8970ef62

    You can download a zip, unzip it and upload file forminator-send-file-as-an-attachment-in-email.php to your wp-content/mu-plugins folder. If that folder doesn’t exist you can simply create it.

    If you are not familiar with mu-plugins you can read about them here:

    https://wpmudev.com/manuals/wpmu-manual-2/using-mu-plugins/

    or you can paste it in your child theme’s functions.php file.

    Kind regards,

    Tho Bui