OK, I’ve used Auto Responder a hundred times. But I cannot determine why it’s not working on this form.
At one point I was getting an invalid fiar email address. The senders email address was called ‘email2’. I changed that to ‘email’ and the error went away but still no auto responder is being sent.
I added &emailCC=email but that is not being deliver either.
The value of the email address IS appearing in the email sent to the client.
The redirect is working so the autoresponder hook isn’t failing completely.
The only other thing I can suggest is going into the Autoresponder code and adding some debugging statements that write values to the MODX error log like this:
Usually, the &fiarFrom value needs to be for a user who has an email account at the server with the right to send mail.
The client has it’s own email server MS 365. That account is a valid email account that they use to receive submissions. I assume it can also send, but I’m confirming that.
Where in the Autoresponder.php does the debug code go? I tried putting it right after the ? at the top of the file. That caused an error msg.
The code would go inside the curly braces of any of the functions, which look like this:
public function somefunction() {
/* debugging code somewhere in here */
}
If displaying a variable’s value, the code must be below where its value is set.
Try this first: FormIt and the hooks class should produce their own error messages. I don’t use FormIt and the error placeholders aren’t very well documented. Try taking out the redirect hook and adding these placeholders to the page with the form:
The results with QuickEmail and the error placeholders suggests that it’s something to do with the host/server and not your code or MODX (though do check your spam folder for the QuickEmail message).
On the 500 error, you probably don’t want to be calling MODX services in a constructor. The variable you’re looking for is not set at that point anyway. Any other function should work, though signs point to a problem higher up in the system. Maybe the mail() function is disabled. Have you tried SMTP?