Copied to clipboard

Flag this post as spam?

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


  • Adam Sutton 1 post 71 karma points
    Jul 02, 2018 @ 10:47
    Adam Sutton
    0

    Automation email not sending?

    Hi there,

    We currently have a 'resources' page on our website, which allows customers to download whitepapers that we have written.

    On the page, it allows the customers to click a 'download' button which then prompts them to enter their name and email saying that we will email the whitepaper to them as well as it downloading.

    However, the emails are not sending, and to download the page the customer has to click on 'download' again which isn't very clear.

    How can I change it so that once the button is clicked from the submission form, it automatically starts to 1, download the file and 2, sends an email to the customer.

    Any help would be greatly appreciated!

    Adam

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Jul 31, 2018 @ 13:40
    Ravi Motha
    1

    so lets address this in order. 1 i would write a function that would take over the click event. something along these lines

    https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/how-to-add-an-event-handler-using-code

    May be better examples and may be more umbraco-centric ones

    1. in that function you can then fire another event to send an email with the document attached; The link below has some general settings and stuff on sending email

    https://our.umbraco.com/forum/using-umbraco-and-getting-started/87051-how-to-send-and-recieve-emails-in-umbraco-76-starter-kit

    3 the last event in the would be the response to download the file

    Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName)

    https://stackoverflow.com/questions/12145390/how-to-set-downloading-file-name-in-asp-net-web-api

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies