I'm using the Pixel & Tonic Contact Form plugin. I have created a template and I'm using the example code from the README file.
No email is being sent. Upon submit it redirects to the form page. I have successfully sent myself an email test using Php Mail.
Do I need a template at:
<input type="hidden" name="action" value="contactForm/sendMessage">
This is my code:
{% macro errorList(errors) %}
{% if errors %}
<ul class="errors">
{% for error in errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{% from _self import errorList %}
<form method="post" action="" accept-charset="UTF-8">
{{ getCsrfInput() }}
<input type="hidden" name="action" value="contactForm/sendMessage">
<input type="hidden" name="redirect" value="/thank-you-for-contacting-us">
<h3><label for="fromName" style="display:block">Your Name</label></h3>
<input id="fromName" type="text" name="fromName" value="{% if message is defined %}{{ message.fromName }}{% endif %}">
{{ message is defined and message ? errorList(message.getErrors('fromName')) }}
<h3><label for="fromEmail" style="display:block">Your Email</label></h3>
<input id="fromEmail" type="text" name="fromEmail" value="{% if message is defined %}{{ message.fromEmail }}{% endif %}">
{{ message is defined and message ? errorList(message.getErrors('fromEmail')) }}
<h3><label for="subject" style="display:block">Subject</label></h3>
<input id="subject" type="text" name="subject" value="{% if message is defined %}{{ message.subject }}{% endif %}">
{{ message is defined and message ? errorList(message.getErrors('subject')) }}
<h3><label for="message" style="display:block">Message</label></h3>
<textarea rows="10" cols="40" id="message" name="message">{% if message is defined %}{{ message.message }}{% endif %}</textarea>
{{ message is defined and message ? errorList(message.getErrors('message')) }}
<input id="kneesbees" class="kneesbees" name="kneesbees" type="text">
<input type="submit" value="Send">
</form>
contactForm/sendMessage
- that is the plugin action. So after submitting you don't get sent to "thank-you-for-contacting-us" ?devMode
? If so, you should see any problems and errors showing up in the logs.