Debug contact form: how? message gets displayed, nothing in logs, but no mail gets sent?

So I set up a contact form and the email plugin on a new Grav site in pretty much the same way I’ve done quite a few times before, the only difference being the server. This site is hosted with a provider which I haven’t worked with before, and apparently it’s not an Apache server according to Grav Tools > Reports (it says there under Apache Modules: “Apache not installed, skipping…”).

The form is pretty long so I’ll leave out some fields, here it is:

cache_enable: false
form:
    name: kontakt
    fields:
        form_type:
            label: Formularangaben
            type: radio
            outerclasses: 'closed form_type-outer'
            classes: form_type
            options:
                kontakt: 'Allgemeine Anfrage'
                trennung: 'Scheidung & Trennung'
                erbschaft: 'Erbschaft & Schenkung'
        name:
            label: 'Ihr Name'
            autocomplete: 'on'
            type: text
            validate:
                required: true
        email:
            label: 'Ihre Mail-Adresse'
            type: email
            validate:
                required: true
        telefon:
            label: 'Ihre Telefonnummer'
            type: tel
        message:
            label: 'Ihre Nachricht'
            type: textarea
            validate:
                required: true
    buttons:
        submit:
            type: submit
            value: Abschicken
        reset:
            type: reset
            value: Zurücksetzen
    process:
        email:
            subject: 'Post vom Kontaktformular'
            body: '{% include ''forms/data.html.twig'' %}'
        message: 'Vielen Dank für Ihre Nachricht! Wir werden uns baldmöglichst bei Ihnen melden.'
        display: nachricht-gesendet

Like I said, I have used this form on other sites before, and I also checked the settings in the email plugin. Everything seems to be much the same as usual. When I fill out and submit this form on the frontend, I get the page that I set as display (nachricht-gesendet), but NO message of any kind. And there’s nothing in the Grav log (under Tools), the email plugin is set to debug though.

I have tried putting different email addresses as the default to: address in the plugin settings, none of them gets an email. I also deliberately misspelled one to see what would happen, and I still don’t get an error of any kind anywhere. How do I debug this? What could be going wrong, under which part of the hood?

Super grateful, as always, for any and all ideas!

@Netzhexe, To test if your email plugin is configured properly, you could try:

$ bin/plugin email test-email -t steve@apple.com

See more troubleshooting in README of Email plugin.

apparently it’s not an Apache server according to Grav Tools > Reports (it says there under Apache Modules: “Apache not installed, skipping…”).

Grav’s conclusion is not necessarily true.

And there’s nothing in the Grav log (under Tools), the email plugin is set to debug though.

When debugging is switched on, the result is written to ‘/logs/email.log’ and is accessible in Admin. You do have to select a log type from the dropdown though. The url is ‘//yourdomain/admin/tools/logs?log=email.log’.

Other possibilities:

  • The email may have been sent correctly to the provider, but got stuck at the provider. You might try to login to the account at the provider and check the logs if emails have been received and sent.
  • The provider’s mail server(s) might be blacklisted by large email services like Gmail. In that case, your provider is considered a spamming server and emails are blocked.

Aaaaaahhh so I completely overlooked that select option where I could choose the email logs…! Once I’d switched to that, it very clearly said “550 relay not permitted !!” and apparently this server won’t let me send mail to addresses on domains other than the origin. I put in a recipient address on the same domain, and everything works perfectly now. Thank you for your help!!