Copied to clipboard

Flag this post as spam?

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


  • Mads Dalsgaard 2 posts 72 karma points
    Sep 12, 2017 @ 13:25
    Mads Dalsgaard
    0

    Umbraco ContactForm

    Hey guys have a small problem with my contact form hope you will help

    just as soon i have added this line using (Html.BeginUmbracoForm ("ContactForm")) to my view

    Can I Redirect to Current UmbracoPage, that is, my HomePage but will not send that email from my contact form.

    But if I remove using (Html.BeginUmbracoForm ("ContactForm"))

    then it may send an email, but I'm getting a mistake

    My controller:

    [HttpPost] public ActionResult ContactSubmit (string name, string email, string message, string subject) { EmailClient emailClient = New EmailClient ("smtp.gmail.com", 587, "[email protected]", "password", true); emailClient.SendNotification (name, email, subject, message); TempData ["ContactMSG"] = "Your message was sent, check your mail for confirmation. "; return RedirectToCurrentUmbracoPage ("HomePage"); }

Please Sign in or register to post replies

Write your reply to:

Draft