Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Email plugin permissions – need some guidance

form plugins

Solved by Paul Murray View solution

Started by Paul Murray 6 years ago · 1 replies · 505 views
6 years ago

I'm having an issue with getting an email form to send on my live server (Centos 7). It works locally perfectly, and when logged into my server as a superuser (root) I can send a test email from the command line and it arrives to my inbox (and a remote inbox not on the server) just fine. I cannot however get the form to submit through the browser.

I'm guessing it's a permissions issue, and I've read the guide on fixing permissions but I'm not entirely sure what I should be doing to resolve it. I've checked and Apache is running as nobody:nobody, whilst my Grav site is running under the virtual host account name pinsite:pinsite.

Who/what do I need to give permission to?

6 years ago Solution

So, after much tweaking, Googling and testing, I finally managed to get it working. Essnetially the form was timing out and the server was throwing a generic 500 error message. Here's what I did to resolve it.

First I made sure my server was running PHP7+ by default. Originally I was just using .htaccess to switch to PHP7 for that domain. This normally works just fine, but to be safe I ensured the CLI was running 7.X too.

Then I ensured the files inside the bin folder were executable with chmod +x bin/*

Finally, as mentioned here, I changed the Sendmail flag at the bottom of the plugin settings page from -bs to -t.

Now the form submits, the notification pops up and emails arrive as expected.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 64 17 hours ago
Support · by Anna, 3 days ago
2 68 20 hours ago
Support · by Justin Young, 21 hours ago
1 35 21 hours ago
Support · by Duc , 1 week ago
2 71 6 days ago
Support · by Colin Hume, 1 week ago
2 63 6 days ago