Fixing WordPress plug-in Pirate Form
I’ve been using a theme on another site that uses the WordPress plug-ion Pirate Forms for its contact form. The problem was that although it would say that the email was sent, the email never arrived. It took me a while, but I finally figured out the problem with Pirate Forms. When it creates the header string to send with the email, it is using the email from the form as the “from” email.
So what’s wrong with that? It’s what the sender is inputting into the form as his email. Well, apparently some servers want the email coming from a known and valid email and won’t accept what was input into the form. Fortunately, the solution is quite simple, just change the variable from $send_from to $site_email. See below:
Original line: $headers = “From: $send_from_name <$send_from>\r\nReply-To: $send_from_name <$send_from>”;
Edited line: $headers = “From: $send_from_name <$site_email>\r\nReply-To: $send_from_name <$send_from>”;
Make sure you enter a valid/known email in the Contact notification sender email field on the Pirate Forms settings Option tab.