This has been driving me crazy for a week. I have a FormIt snippet call on a client’s website that looks like this:
[[!FormIt? &hooks=`recaptcha,spam,email,redirect`
&emailTpl=`ContactFormEMail`
&emailSubject=`Someone Filled Out the Contact Form`
&emailTo=`[email protected],
[email protected],
[email protected]`
&redirectTo=`60`
&validate=`fromname:required,
fromemail:email:required,
fromsubject:required,
description:required:stripTags`
]]
As written, filling out the form does nothing. It simply reloads the page at which this code resides, blanking the form and not sending an e-mail. The MODx Error Log reports: "(ERROR @ /index.php) [FormIt] An error occurred while trying to send the email. Could not instantiate mail function."
I have removed the spam and recaptcha hooks, I have removed validation. I have set the page to uncached. I have cleared the cache. I have ripped FormIt completely out and reinstalled it from Package Management. The only thing that makes it work is to take out all but one of the recipients in &emailTo.
This site is on Bluehost and their support people tell me there are no restrictions on the use of mail() in PHP that would cause multiple recipients to fail but a single one to work. Also, when creating a new user in the Manager, MODx sends a password e-mail without incident.
I have read some posts here that suggest hacking FormIt or core, or using an SMTP server, but RTFM states that multiple recipients can be processed by FormIt without jumping through any hoops.
The site is running 2.1.1-pl (traditional) and FormIt 1.6.0 rc1. No update to FormIt appears to be available. It also didn’t work in previous versions, and as part of my troubleshooting I upgraded to the latest MODx and FormIt.
I don’t usually run into this situation with FormIt but in this particular case I need to send these contact forms to three addresses. Would appreciate any help you could provide, as this is a paid job for a client who has been very good to me.