Hi,
I have a modular page contact.html.twig that contains a form
I wanna send an email that contains the form content and show a thank you message when I click the send button.
I tried to add this code to modular.md file
content:
items: '@self.modular’
order:
by: default
dir: asc
custom:
- _about
- _feed
- _team
- _partners
- _contact
form:
action: /01.home/_contact
name: my-nice-form
fields:
-
name: name
label: Name
placeholder: 'Enter your name’
autofocus: 'on’
autocomplete: 'on’
type: text
default: test
and creating a file user/config/plugins/email.yaml:
enabled: true
from: 'my_email’
from_name: 'my_name’
to:
to_name:
mailer:
engine: mail
smtp:
server: localhost
port: 25
encryption: none
user: 'xxxxx’
password: 'xxxx’
sendmail:
bin: '/usr/sbin/sendmail’
content_type: text/html
But I don’t know how to connect my form in contact.html.twig to all of them and make it work.
Thank you in advance