Add contact form

Hi

To make a contact form, I have copied the files from here: https://gist.github.com/bastianallgeier/c396df7923848912393d

I have added my email address to the “build the email” section in “contact.php”

I tried it on localhost (OS X High Sierra). The form appears and seems to be working fine; after submission I am being forwarded to the Thank-you-page. But I don’t receive any submitted messages on the email address specified in the “contact.php”-file.

Are there any further changes that need to be made? Is it just because it’s running under localhost?

Thank you for your help.

Usually, sending mail is not enabled on localhost.

Okay! Thank you for the information.

Try if it works on your remote host.

Unfortunately, it doesn’t work on my remote host, either. The form doesn’t send a submission notification email.

I run my Kirby site on a Linode server instance, set up with Laravel Forge.
I have activated the debug mode but got no alert when submitting messages; also, I am being forwarded to the thank-you-page as intended, so everything seems okay there.

Just the sending doesn’t work. Can you help?

Have you installed sendmail on your Linode instance and if yes, is it configured correctly to send email? You might check the Linode forums to get help with that in the first place.

You might want to test if you can send mail from the command line.

https://forum.linode.com/viewtopic.php?f=11&t=15823&hilit=sendmail

Thank you for your recommendation!

Did you get it to work?

An alternative would be to install PHPMailer… (it’s a better alternative to sendmail in any case and gives you more power and control).

I haven’t installed any mailer agent yet. I was considering Postfix. But I will probably use formspree.io in order to keep my server slim. Thank you for your help!