Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ansar 181 posts 291 karma points
    Apr 21, 2015 @ 20:01
    Ansar
    0

    Umbraco Forms email workflow - Full path of uploaded files or files as attachments

    Currently the file attachments are shown as relative path starts with ~/media/forms/upload/ . To view the file, the user has to copy the path and append the domain name in the start. 

    It will be much better if the full path is shown in the email - or attach the files with the email.

    We have to make custom workflow just becuase of this issue and now stuck with another bug I have reported here.

    https://our.umbraco.org/forum/umbraco-pro/contour/64153-Umbraco-Forms-How-to-sort-recordsRecordFields-as-it-appears-in-the-frontend

    Any help on one of these things (fullpath/attachment or proper sortorder for custom workflow) will be greatly appreciated.

  • Dennis Aaen 4492 posts 18198 karma points admin hq c-trib
    Apr 21, 2015 @ 21:10
    Dennis Aaen
    101

    Hi Anz,

    If you are using the latest version of Umbraco Forms at the moment 4.1.0, then you have the option to choose that uploaded files should be as attachments in the email.

    If you go to the workflows, and click on submitted workflow you have the option to click attach file uploads to email. Here is the documentation about attaching workflows https://our.umbraco.org/documentation/Products/UmbracoForms/Editor/Attaching-Workflows

    Hope this can be an option for you to solve your case.

    /Dennis

  • Lazau Florin 74 posts 210 karma points
    Feb 15, 2017 @ 13:58
    Lazau Florin
    0

    Hi Dennis,

    I have the option of attaching files to email, but if I check that I don't receive the email.

    Any help?

    Thanks, Florin

  • Dennis Aaen 4492 posts 18198 karma points admin hq c-trib
    Feb 15, 2017 @ 14:21
    Dennis Aaen
    0

    Hi Florin,

    Okay if you are working with your site local then you should try use SMTP4Dev, https://smtp4dev.codeplex.com to test if you are getting mail on localhost using this program.

    If you do then you know that there is something wrong with you SMTP settings in the web.config.

    Hope this helps,

    /Dennis

  • Lazau Florin 74 posts 210 karma points
    Feb 15, 2017 @ 14:46
    Lazau Florin
    0

    Hi Dennis,

    Unfortunately, I don't get the email in SMTP4Dev. If I uncheck "Attach file uploads to email" it works but with this option checked I don't get the email. It seems that my SMTP config is correct.

    Thanks, Florin

  • Lazau Florin 74 posts 210 karma points
    Feb 21, 2017 @ 17:38
    Lazau Florin
    0

    Hi Dennis,

    This is the error that I get when try to send an email with attachement and with "Attach file uploads to email" checked:

    There was a problem sending an email to '[email protected]' from Workflow for Form 'Form test' with id '910f6d62-f344-47fc-ae94-fdd31508ac24' for Record with unique id '7114907a-0414-414e-812d-bced4dc15b18'
    System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\home\site\wwwroot\media\forms\upload\form_910f6d62-f344-47fc-ae94-fdd31508ac24\161b54bd-7753-4fd6-a29c-48812cb6e4d5\topics.png'.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
       at System.Net.Mail.Attachment..ctor(String fileName)
       at Umbraco.Forms.Core.Providers.WorkflowTypes.SendEmail.Execute(Record record, RecordEventArgs e)
    

    If I replace D:\home\site\wwwroot\ with my domain I can access the image.

    I really appreciate any help.

    Thanks, Florin

  • Chriztian Steinmeier 2750 posts 8456 karma points MVP 6x admin c-trib
    Apr 21, 2015 @ 21:13
    Chriztian Steinmeier
    2

    Hi Anz,

    I've been doing something in Contour at some point where we were using the "Send XSLT transformed e-mail" action/trigger/workflow.

    I tackled it with this template in the XSLT, to provide a link to the file:

    <!-- Template for a File upload field -->
    <xsl:template match="*[datatype][contains(values/value, '/umbraco/plugins/umbracoContour/files/')]" mode="value">
        <a href="http://{umbraco.library:RequestServerVariables('SERVER_NAME')}{values/value}">
            <xsl:value-of select="values/value"/>
        </a>
    </xsl:template>                             
    

    - but it sounds like that's not an option for you, or maybe I'm not really understanding your problem?

    /Chriztian

    EDIT: Never mind me, sounds like Dennis has tried the Forms stuff :-)

  • Ansar 181 posts 291 karma points
    Apr 23, 2015 @ 08:17
    Ansar
    0

    Thanks Dennis. It works great :)

    Thanks Chriztian - yes we do something similar with Razor for Contour forms. It works with new Umbraco Forms as well but we couldnt find a way to sort the fields as it appears in the frontend. Probably something that will be fixed in next release of Umbraco Forms. 

  • Andy McKay 2 posts 22 karma points
    May 28, 2015 @ 10:31
    Andy McKay
    0

    Hi,

    I'm having a similar issue, however, I'm using Contour forms, which are missing the option to attach files to emails? Does anyone have any experience using Contour forms and how I could potentially get round the issue?

    Many thanks,

    Andy

  • Ansar 181 posts 291 karma points
    May 28, 2015 @ 10:38
  • Andy McKay 2 posts 22 karma points
    May 28, 2015 @ 11:32
    Andy McKay
    0

    Anz, this is exactly what I was after, works like a treat! Thank you so much!

  • Matthew Kirschner 323 posts 611 karma points
    Jun 23, 2015 @ 20:28
    Matthew Kirschner
    0

    The attachments that Dennis pointed out are a great feature that I didn't know, so thanks for that.

    On the other hand, the original question has still not been answered. How do you get Umbraco Forms to create absolute paths for the document links? Having the "~/media/forms/..." path means next to nothing to the user if they can't click it and view the file.

    There has to be a better way than to manually add the host name in the Forms templates, as Chriztian suggested.

  • Sjaak van der Heide 11 posts 32 karma points
    Sep 24, 2015 @ 14:00
    Sjaak van der Heide
    0

    No progress here yet?

  • Rick van der Meij 35 posts 135 karma points
    Nov 17, 2015 @ 15:12
    Rick van der Meij
    0

    Why is there not just a checkbox on the xslt tranformed email for attaching files?

  • Travis Nelson 7 posts 27 karma points
    Jan 24, 2017 @ 15:51
    Travis Nelson
    0

    I hate to dig up an old post, but has anyone ever resolved this?

    I'd love to get a copy of the original Workflow C# class for "Send Email" just so I can change that relative link to an absolute one. The relative link URL in an email is absolutely useless but otherwise the email workflow is perfect.

    I know there is an option to attach files to the email, however the form I'm working with permits users to upload large files, sometimes in excess of 50MB, and email attachments aren't an option here.

  • Matthew Kirschner 323 posts 611 karma points
    Jan 24, 2017 @ 16:10
    Matthew Kirschner
    0

    I think the issue with bringing back this post in particular is that it appears to have been "answered" and may get ignored by the Forms team.

Please Sign in or register to post replies

Write your reply to:

Draft