0

I am setting up a new site using EE 6 and I am having issues with the form. I have set the Outgoing email settings and have a valid email.

Here is the form:

{exp:email:contact_form user_recipients="no" class=" bg-light-blue mx-auto" recipients="[email protected]" charset="utf-8"}
   <div class="form-header bg-blue pt-2">
        <p class="white-text text-center" style="font-size: 1.5rem; margin-top: .2rem;">Get a free estimate</p>
    </div>
    <p>
        <label for="from"></label><br />
        <input type="text" id="from" name="from" placeholder="Name*"  value="" />
    </p>
    <p>
        <label for="email"></label><br />
        <input type="text" id="email" name="email" placeholder="Email*" value="" />
    </p>
    <p>
        <label for="phone"></label><br />
        <input type="text" id="phone" name="phone" placeholder="Phone" value="" />
    </p>
    <p>
        <label for="message"></label><br />
        <textarea id="message" name="message" class="pt-2 px-2" id="comments" placeholder="Tell us about your project, ask questions and let us know when you would be available to discuss your project and get a free estimate of the cost."></textarea>
    </p>
    <p>
        <input name="submit" type='submit' value='Submit Form' />
    </p>
{/exp:email:contact_form}

I have tried PHP, Sendmail and SMTP but keep getting the following error:

A valid sender email is required

I am not sure what I am doing wrong on this.

Thanks.

2 Answers 2

1

You can test your email settings from within the EE6 Control Panel.

Go to Tools/Utilities/Send Email and you get a form that allows you to send an email from the EE installation to an arbitrary email address.

Try to send yourself an email from there. If that doesn't work then the issue is with your outgoing email settings, not your form.

I think also you have a problem with the names of input fields in your form. If you check the documentation you'll see:

  • The field for the email address of person filling in form should be named from (not email)
  • The field for the name of the person filling in the form should be named name (not from)

HTH

1
  • 1
    Thank you for the insights on that. I didn't realize the field names had to be so precise. Everything is working correctly now.
    – forrest
    Commented May 10, 2021 at 14:10
1

jCogs is correct. your Email input name="" attribute needs to be "from". So:

<label for="email"></label><br />
<input type="text" id="email" name="from" placeholder="Email*" value="" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.