Copied to clipboard

Flag this post as spam?

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


  • Michael Mégroz 20 posts 111 karma points
    Jun 29, 2018 @ 09:21
    Michael Mégroz
    0

    From to Email

    I have a Problem. I will do a form for Contact. In this From can the Customer ask Question. When the Customer is finish he will click send. This event will send me a email to [email protected] is this possible an how. The email is to definite in the backend.

  • Craig 34 posts 270 karma points
    Jun 29, 2018 @ 14:05
    Craig
    0

    Hi Michael,

    The video in this post should help you understand all you need to create a contact form that sends an email:

    https://our.umbraco.com/forum/using-umbraco-and-getting-started/80804-tutorial-how-to-create-a-contact-form-in-umbraco-using-mvc-and-c

    As far as getting your email content from the back office you should be able to use something like:

    int emailTemplateId = [Node Id of Email from Back Office];
    var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
        IPublishedContent emailTemplate = umbracoHelper.TypedContent(emailTemplateId);
        string emailBody = emailTemplate.GetPropertyValue<string>("[Attribute Name that contains the Email Body Goes Here]");
    
  • 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