Contact Form
Maintained by
Michael Milette
Contact Form is a Moodle plugin that allows your site to process and send information submitted through HTML web forms to the site's support email address or primary administrator if the support email address is not defined.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Best regards,
Michael
If you are committed to making your code work, I suggest you ask your question in the developers forum. I will give you a hint though - you've stripped out too much code when making your sendmail.php.
But, as you can see, there is nothing wrong with the html code, or php code. I have tried these outside of moodle, and they work.
My webhost crashed my site. They had some huge hardware issue. Fortunately, I saved my content, including my contactus.html file, and my sendmail.php file.
I am using Moodle 3.7.7. That is the most recent version my hosting company allows. I am not using SSL or TLS for my email.
I put the contactus.html in a static page, and the sendmail.php in the ../public_html/local/contact/ directory. This is the same way I had setup before.
I set up outgoing email in moodle, and tested it, it works fine.
But the contact form will not send emails. I am not sure how to trouble-shoot this.
I stripped down the contactus.html form because I kept getting sesskey errors. This was working fine:
-------------
---------------
Here is the sendmail.php
-----------------
<?php$email=$_POST['email'];
$subject=$_POST['subject'];
$message=$_POST['message'];
mail($email ,$subject, $message);
?>
Best regards,
Michael
https://github.com/michael-milette/moodle-local_contact/blob/master/README.md
For additional help, please submit your questions to:
Discussion forums: https://moodle.org/mod/forum/discuss.php?d=352851
To report a bug, please submit your support request to:
Issue tracker: https://github.com/michael-milette/moodle-local_contact/issues/
For faster paid support, please contact me through my website at:
http://www.tngconsulting.ca/
Best regards,
Michael