Closed robsonsobral closed 10 years ago
This update seems to have stopped our more recently added contact forms from working. It could just be our server setup, but we were always getting the 'mail not sent' error, with no logical reason for it and no errors logged on the server.
Eventually we got this working simply by dropping the 5th parameter from the mail function.
return mail($options['to'], $options['subject'], $message, implode("\r\n", $headers));
Also, having spent the last few hours Googling and checking our logs, I can't actually see any examples of the mail function using the flag "-r". So since we changed the flag on the 5th parameter from -r to -f as per other examples I've come across, this also worked.
return mail($options['to'], $options['subject'], $message, implode("\r\n", $headers),"-f".($options['from'] ? $options['from'] : $input['from'] ));
The 5th parameter is optional, so I'd say this commit was specific for a given server environment. In the interest of keeping the plugin as generically suitable as possible, would it be better to remove this additional flag from the master?
Hi!
I spent some time looking for a way to serve us both, but I couldn't.
You're right. The flag should be removed. Do a pull request and, if you don't mind, add a comment about it.
Ok - thanks.
The from parameter wasn't being used. Please, check its description on the readme. My English is really poor.