So I need again your help guys. I'm building for the first time a contact form but despite my efforts, nothing.
The structure is the same, page "Contacts" with modular.md
<details>
<summary>modular.md</summary>
title: Contacts
cache_enable: false
form:
name: contact-form
action: /contacts
fields:
-
name: form-name
label: Name
placeholder: Name
autocomplete: on
type: text
validate:
required: true -
name: form-email
label: Email
placeholder: Email
type: email
validate:
rule: email
required: true -
name: form-phone
label: Phone
placeholder: Phone
type: tel -
name: textarea
id: textarea
label: messages
placeholder: Tuo Messaggio
type: textarea
validate:
required: truebuttons:
-
type: submit
value: Sendprocess:
-
email:
from: "{{ config.plugins.email.from }}"
to:- "{{ config.plugins.email.from }}"
subject: "[Contact] {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- "{{ config.plugins.email.from }}"
-
save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}" -
display: thankyou
content:
items: '@self.modular'
order:
by: default
dir: asc
custom:
- _map
-
_contact
</details>
Inside _contact sub-folder there is a form.md and form.html.twig has {% include 'forms/form.html.twig' %}
So the form is loaded perfectly but when I submit it, I got this error:
Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
Email-Plugin is setted as SMTP with Mailtrap.io account, one personal email for "from" and "to", and I used different emails for submit test.
Everything is update.
I don't get what is going wrong, do you have any ideas?