Support » Plugin: Contact Form 7 » Can we not use _site_admin_email in the “To” and “From” fields?

  • I am trying to create a form that uses the following Special Mail Tags:
    [_site_admin_email]
    [_site_title]

    I would like to use these in the To and From fields, like this:
    To [_site_title] <[_site_admin_email]>
    From [_site_title] <[_site_admin_email]>

    But I am getting the following error message below each of these form fields:
    Invalid mailbox syntax is used.

    Is what I am trying not valid, or is the validation JS not understanding the plugins own Special Mail Tags?

    Thanks,
    Atg

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Aaron T. Grogg

    (@aarontgrogg)

    When using the above, I am not able to even submit the form, I can an error message.

    Thread Starter Aaron T. Grogg

    (@aarontgrogg)

    And when I change [_site_admin_email] to a hard-coded email address, the form submits, but neither of the above Special Mail Tags get converted in the email that the form sends…

    Both remain unchanged, like this:
    Contact Request from [_site_title]

    This e-mail was sent from [_site_title] ([_site_url]).

    Am I doing something wrong? I do not see any special configuration requirements on the doc page:
    https://contactform7.com/special-mail-tags/

    Thanks again,
    Atg

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the site?

    Thread Starter Aaron T. Grogg

    (@aarontgrogg)

    The site is still under development, but I think this is really a question about capabilities, right?

    Should those special mail tags work in the To, From and Content sections?

    Is there anything special that I need to do to make them work?

    Is there anything I might be doing to make them not work?

    Here is exactly what I have…

    FORM:
    Has only four fields:

    1. [text* user_name]
    2. [email* user_email]
    3. [text* user_subject]
    4. [textarea* user_message]

    MAIL:

    To: [_site_title] <[_site_admin_email]>
    From: [user_name] <[_site_admin_email]>
    Subject: Contact Request from [_site_title]: [user_subject]
    Message:
    Name: [user_name]
    Email: [user_email]
    Subject: [user_subject]
    Message: [user_message]

    This e-mail was sent from [_site_title] ([_site_url]).

    MAIL (2):

    To: [user_name] <[user_email]>
    From: [_site_title] <[_site_admin_email]>
    Subject: Contact Request at [_site_title]: “[user_subject]”
    Message:
    Thank you for contacting [_site_title].
    We will get back to you as soon as possible.
    Sincerely,
    [_site_title]
    [_site_url]

    This e-mail was sent from [_site_title] ([_site_url]).

    Issues:

    1. If I use [_site_admin_email] in either the To or From field, I get “Invalid mailbox syntax is used.” error messages on the backend, and the form will not submit on the frontend:
      https://dev.advantipro.de/kontakt/
    2. If I change MAIL‘s:

      To: [_site_title] <[_site_admin_email]>

      to:

      To: [_site_title] <support@example.com>

      the error messages disappear on the backend, and the form will submit on the frontend, but the admin email address receives this email from Mail:

      To: support@example.com
      From: Aaron T. Grogg [support@example.com]
      Subject: Contact Request from [_site_title]: Testing Contact Form
      Message:
      Name: Aaron T. Grogg
      Email: myemail@gmail.com
      Subject: Testing Contact Form
      Message: Test.

      This e-mail was sent from [_site_title] ([_site_url]).

      And the user never receives anything from Mail (2).

    3. If I then change MAIL (2)‘s:

      From: [_site_title] <support@example.com>

      to:

      From: support@example.com

      the user receives an email, but receives this:

      To: Aaron T. Grogg [myemail@gmail.com]
      From: WordPress <support@example.com>
      Subject: Contact Request at [_site_title]: “Testing Contact Form”
      Message:
      Thank you for contacting [_site_title].
      We will get back to you as soon as possible.
      Sincerely,
      [_site_title]
      [_site_url]

      This e-mail was sent from [_site_title] ([_site_url]).

    I hope this somehow makes sense…

    Thanks in advance,
    Atg

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can we not use _site_admin_email in the “To” and “From” fields?’ is closed to new replies.