• I keep getting a syntax error in my Additional Headers field. I’m not sure why since the only thing in that field is: Reply-To: [your-name] <[your-email]>

    I’ve read over the Contact 7 documentation a dozen times and I’m not sure why I’m getting the error message. Everything else in my contact form is configured correctly as far as I can tell. I also use the Postman SMTP plugin – but this Additional Headers syntax error existed before I installed/configured Postman.

    Anyone have an idea of what the issue is? I’m banging my head against the wall trying to figure this out! Thanks in advance for helping me out!

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try making those form-tags required(*). e.g.

    [text* your-name]
    [email* your-email]
    Thread Starter aharvard

    (@aharvard)

    Thanks for replying. But those form-tags are marked as required in my form. Are you saying that I should mark them as required in the Additional Headers field too???

    No, they can only be set as required in the form-tags. What happens if you change the syntax? e.g.

    FORM
    [text* name-256]
    [email* email-145]
    
    MAIL
    Additional Headers: Reply-To: [name-256] <[email-145]>

    Thread Starter aharvard

    (@aharvard)

    Are those just random numbers? Does it matter which numbers I use? Sorry for all the questions, for whatever reason Contact Form 7 is a little confusing for me!

    Yes, they are just random numbers. You can use pretty much any word/two-word/word-number combination, but they have to correspond between the form-tag and mail-tag. My suggestion here is because sometimes there is a minor syntax disagreement that the user doesn’t notice, but which is resolved when a different tag name is used.

    Thread Starter aharvard

    (@aharvard)

    Thanks for that! I’ll try to make this my last question (sorry for so many!). Given what you just told me, do you think that my issue could be because my form-tags include placeholder text? They look like this:

    [text* your-name placeholder "name"]
    [text* your-email placeholder "email"]

    My form looks better with placeholder text rather than using name and email labels above the field boxes on my site, so I want to keep the placeholders if at all possible. Thanks!

    No, that won’t make any difference at all. Those placeholders look absolutely fine. Provided that you set up the form-tags as per the plugin guidance, then you just have to make sure that the form-tag name corresponds exactly to the mail-tag:

    [text* your-name placeholder “name”] –>> [your-name]
    [text* subject-475 placeholder “your subject”] –>> [subject-475]
    [email* your-email] –>> [your-email]

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Additional Headers Syntax Error’ is closed to new replies.