Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Wrong form configuration?

Solved by elisabetta View solution

Started by elisabetta 6 years ago · 1 replies · 637 views
6 years ago

Hi all!
It looks like I have a lot of trouble in configuring correctly the contact form.
with the following configuration in front matter:

TWIG
email:
   from:
      mail: '{{ config.plugins.email.from }}'
   to:
      mail: '{{ form.value.email }}'
      name: '{{ form.value.name|e }}'
   reply_to: '{{ form.value.email }}'
   subject: '[Contact] New message from {{ form.value.name|e }}'
   body: '{% include ''forms/data.html.twig'' %}'

the mail sent is not received in the correct email post box.
let us say that this box is [email protected] and the sender mail is [email protected],
the form submitted is received at [email protected], but not in the [email protected]
In the email plugin, the "to" and "from" email are configured as [email protected]
Where is the error?

last edited 02/26/21 by pamtbaau
6 years ago Solution

@maria:
form.value.email

Ok! just found the problem: the value

TWIG
to:
   mail: '{{ form.value.email }}'

was overriding the default config plugin to

👍 1
last edited 02/26/21 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Support · by blu3prince, 4 days ago
1 65 3 hours ago
Support · by complanar, 7 days ago
6 156 1 day ago
Support · by Rick Beebe, 7 days ago
2 115 3 days ago
Support · by alex, 5 days ago
2 101 4 days ago
Support · by Marcel, 2 weeks ago
1 151 4 days ago