Contact form on

In case anyone else needs it, here’s how to get a contact form working on namecheap shared hosting. I couldn’t get mine to send using just SMTP from the Email plugin, or using Sendmail, but…

Set up an email address in namecheap cpanel -> emails

Contact namecheap support and ask them to open the SMTP ports, which are closed by default.

Install the Php mailer plugin from zip* via Admin -> Tools -> Direct install

Activate it and set:
Email from: [the email address you created]

Use these settings for the Email plugin:

Email Defaults

From address: [the email address you created]

SMTP Configuration

SMTP Server: cpanel server address - e.g
SMTP Port: 465
SMTP encryption: SSL
SMTP login name: [the email address you created]
SMTP password: [the password you used when you setup that mailbox]

Contact form

        - phpemail:
            # To visitor
            to: "{{ }}"
            subject: "Thank you for getting in touch"
            body: "{% include 'forms/visitor.html.twig' %}"

        - phpemail:
            # To myself
            to: "{{ }}"
            subject: "A message from your website from {{|e }}"
            body: "{% include 'forms/data.html.twig' %}"

Thanks to mickidum for this handy plugin.

* Is there a reason that it can’t be found by searching plugins or installed via command line?