I’m stumped (no surprise)!
I copied the code directly from here
---
title: Contact Form
form:
name: contact
fields:
name:
label: Name
placeholder: Enter your name
autocomplete: on
type: text
validate:
required: true
email:
label: Email
placeholder: Enter your email address
type: email
validate:
required: true
message:
label: Message
placeholder: Enter your message
type: textarea
validate:
required: true
g-recaptcha-response:
label: Captcha
type: captcha
recaptcha_not_validated: 'Captcha not valid!'
buttons:
submit:
type: submit
value: Submit
reset:
type: reset
value: Reset
process:
captcha: true
save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}"
email:
subject: "[Site Contact Form] {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
message: Thank you for getting in touch!
display: thankyou
---
# Contact form
Some sample page content
to make a contact form which can be found here and when submitted it causes an error…
Server Error
Sorry, something went terribly wrong!
0 - No secret provided
Then I took the code from here
---
title: Contact
form:
name: my-nice-form
fields:
- name: name
label: Name
placeholder: Enter your name
autofocus: on
autocomplete: on
type: text
validate:
required: true
- name: email
label: Email
placeholder: Enter your email address
type: text
validate:
rule: email
required: true
- name: message
label: Message
size: long
placeholder: Enter your message
type: textarea
validate:
required: true
buttons:
- type: submit
value: Submit
classes: gdlr-button with-border excerpt-read-more
process:
- email:
from: "{{ config.plugins.email.from }}"
to:
- "{{ config.plugins.email.from }}"
- "{{ form.value.email }}"
subject: "[Feedback] {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- save:
fileprefix: feedback-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}"
- message: Thank you for your feedback!
- display: thankyou
---
to make another contact form which can be found here and when submitted it indicates it was successful, however no email is ever received.
I’ve edited user/plugins/email/email.yaml to include my email addresses in the to/from fields just to test things and nothing is received…
enabled: true
from: my-actual-email-address
to: my-actual-email-address
mailer:
engine: sendmail
smtp:
server: localhost
port: 25
encryption: none
user:
password:
sendmail:
bin: '/usr/sbin/sendmail -bs'
content_type: text/html