No email sent by contact form

The issues I had with a contact form have not been sorted out. The contact form now “works” in that there is no error and it displays the Thankyou message.

However emails are not being sent or received. I assume the problem is in the Email Plugin SMTP setup.

This is the email.yaml in config. I have hashed out the password and email user.
I would appreciate any tips on what is blocking the email action. I have tried both SSL and TLS, neither work.
Thanks in advance.

enabled: true
from: ######@gmwit.com
from_name: null
to: ######@gmwit.com
to_name: MurrayG
queue:
  enabled: true
  flush_frequency: '* * * * *'
  flush_msg_limit: 10
  flush_time_limit: 100
mailer:
  engine: smtp
  smtp:
    server: mail.gmwit.com
    port: 465
    encryption: tls
    user: #######@gmwit.com
    password: #######
    auth_mode: null
  sendmail:
    bin: '/usr/sbin/sendmail -bs'
content_type: text/html
debug: true
charset: null
cc: null
cc_name: null
bcc: null
reply_to: null
reply_to_name: null
body: null

I think for TLS port on SMTP should be 587
Or you could contact your hosting provider and ask for details

Hi, the info from my cpanel is

Username: 	the email address
Password: 	Use the email account’s password.
Incoming Server: 	mail.gmwit.com
IMAP Port: 993 POP3 Port: 995 

Outgoing Server: 	mail.gmwit.com
SMTP Port: 465 

IMAP, POP3, and SMTP require authentication.

I have now tried 2525 (non secure. And 465, 995…

Then try changing encryption to none (not sure about the correct value in config though; Might be null)

@MurrayG, The following works fine with my provider:

port: 465
  encryption: ssl

Yep, that work everywhere but on this email form :crazy_face:
Can this be a que issue or something else in the yaml
just to be sure I am posting the new form data.

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
    buttons:
        submit:
            type: submit
            value: Submit
        reset:
            type: reset
            value: Reset
    process:
        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

Did you try without the queue? Does it work if email is sent directly on submit?

1 Like

Hi Folks. OK, I dont really understand why but its working.
I turned off que and debug.
However, can I ask the following
1 How do I remove this from above the Thankyou message
title: Email sent cache_enable: false process: twig: true

2 how can I restrict the width of the form, ATM its full width…
I will put the sidebar att the end of the form markdown, anything else?
please keep it “simple” I am a learnatic :slight_smile:

@MurrayG,

I believe your original question has been solved. It is a good practice to only have one question with a matching title in each post. The email issue has been fixed.

You can open a new post for a new question.

1 Like