<p>Please check the attached screenshot.</p>
<p><a href="https://i.sstatic.net/mMjAr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mMjAr.png" alt="enter image description here" /></a></p>
<p>In your craft cms Admin panel Go to Settings -&gt; Email as shown in the above screenshot. Please check that you have filled in all the detail in the email settings form. Also if you are using the SMTP as a transport type then you need to check the same SMTP is working with PHP code or not.</p>
<p>You can check the test email using the &quot;Test&quot; button at the bottom of the email setting page.</p>
<p>If nothing works for you then let me know more details so we can help.</p>
<p>Thanks.</p>

CC BY-SA 4.0
2021-08-31T07:55:01.017Z
2021-08-31T07:55:01.017Z
ZealousWeb
<p>I am getting test emails but not contact form email?</p>
<pre><code>{% macro errorList(errors) %}
    {% if errors %}
        {{ ul(errors, {class: 'errors'}) }}
    {% endif %}
{% endmacro %}

{% set message = message ?? null %}

&lt;form method=&quot;post&quot; action=&quot;&quot; accept-charset=&quot;UTF-8&quot;&gt;
    {{ csrfInput() }}
    {{ actionInput('contact-form/send') }}
    {{ redirectInput('contact/thanks') }}

    &lt;h3&gt;&lt;label for=&quot;from-name&quot;&gt;Your Name&lt;/label&gt;&lt;/h3&gt;
    {{ input('text', 'fromName', message.fromName ?? '', {
        id: 'from-name',
        autocomplete: 'name',
    }) }}
    {{ message ? _self.errorList(message.getErrors('fromName')) }}

    &lt;h3&gt;&lt;label for=&quot;from-email&quot;&gt;Your Email&lt;/label&gt;&lt;/h3&gt;
    {{ input('email', 'fromEmail', message.fromEmail ?? '', {
        id: 'from-email',
        autocomplete: 'email',
    }) }}
    {{ message ? _self.errorList(message.getErrors('fromEmail')) }}

    &lt;h3&gt;&lt;label for=&quot;subject&quot;&gt;Subject&lt;/label&gt;&lt;/h3&gt;
    {{ input('text', 'subject', message.subject ?? '', {
        id: 'subject',
    }) }}
    {{ message ? _self.errorList(message.getErrors('subject')) }}

    &lt;h3&gt;&lt;label for=&quot;message&quot;&gt;Message&lt;/label&gt;&lt;/h3&gt;
    {{ tag('textarea', {
        text: message.message ?? '',
        id: 'message',
        name: 'message',
        rows: 10,
        cols: 40,
    }) }}
    {{ message ? _self.errorList(message.getErrors('message')) }}

    &lt;button type=&quot;submit&quot; class=&quot;primary btn&quot;&gt;Send&lt;/button&gt;
&lt;/form&gt;
</code></pre>

CC BY-SA 4.0
2021-08-10T15:03:26.027Z
Please provide more information: What's the context of this code? What errors are you getting? What have you tried to solve this? Also, what do you mean by "Contact Form 7", the WordPress plugin? Please clean up your code example as well. As it stands, this question is unanswerable, so I'm voting to close this.
MoritzLost
CC BY-SA 4.0
2021-08-11T14:21:09.063Z
Does the error handling work properly (eg leaving fields blank, etc.) Are you using any other plugins that modify the default contact form behavior? (eg contact form extensions, honeypot, etc.)
RitterKnight
CC BY-SA 4.0
2021-08-11T14:26:49.157Z
You may also want to consider adding a [flash notice](https://github.com/craftcms/contact-form#displaying-flash-messages) to rule out any other errors.
RitterKnight
CC BY-SA 4.0
2021-08-12T05:38:39.423Z
Not Wordpress Plugin i am using craft contact form plugin and i am not getting any kind of error even in logs as well. @MoritzLost
DTS
CC BY-SA 4.0
2021-08-12T05:39:20.633Z
Error handing flash message everything is working properly but i am not getting emails @RitterKnight
DTS
CC BY-SA 4.0
2021-08-12T07:54:11.473Z
@namita Have you set a recipient (`toEmail`) in the config file? https://github.com/craftcms/contact-form#overriding-plugin-settings
MoritzLost
<craft3><templating><plugin-contactform>
Contact Form - Not sending emails
# Contact Form - Not sending emails

(Asked by: username_0 on 2021-08-10)

I am getting test emails but not contact form email?
{% macro errorList(errors) %}
    {% if errors %}
        {{ ul(errors, {class: 'errors'}) }}
    {% endif %}
{% endmacro %}

{% set message = message ?? null %}


    {{ csrfInput() }}
    {{ actionInput('contact-form/send') }}
    {{ redirectInput('contact/thanks') }}

    Your Name
    {{ input('text', 'fromName', message.fromName ?? '', {
        id: 'from-name',
        autocomplete: 'name',
    }) }}
    {{ message ? _self.errorList(message.getErrors('fromName')) }}

    Your Email
    {{ input('email', 'fromEmail', message.fromEmail ?? '', {
        id: 'from-email',
        autocomplete: 'email',
    }) }}
    {{ message ? _self.errorList(message.getErrors('fromEmail')) }}

    Subject
    {{ input('text', 'subject', message.subject ?? '', {
        id: 'subject',
    }) }}
    {{ message ? _self.errorList(message.getErrors('subject')) }}

    Message
    {{ tag('textarea', {
        text: message.message ?? '',
        id: 'message',
        name: 'message',
        rows: 10,
        cols: 40,
    }) }}
    {{ message ? _self.errorList(message.getErrors('message')) }}

    Send

**Tags:** craft3, templating, plugin-contactform
> **Comments:**
> **username_1**: Please provide more information: What's the context of this code? What errors are you getting? What have you tried to solve this? Also, what do you mean by "Contact Form 7", the WordPress plugin? Please clean up your code example as well. As it stands, this question is unanswerable, so I'm voting to close this.  
> **username_2**: Does the error handling work properly (eg leaving fields blank, etc.) Are you using any other plugins that modify the default contact form behavior? (eg contact form extensions, honeypot, etc.)  
> **username_2**: You may also want to consider adding a [flash notice](https://github.com/craftcms/contact-form#displaying-flash-messages) to rule out any other errors.  
> **username_0**: Not Wordpress Plugin i am using craft contact form plugin and i am not getting any kind of error even in logs as well. @MoritzLost  
> **username_0**: Error handing flash message everything is working properly but i am not getting emails @RitterKnight  
> **username_1**: @namita Have you set a recipient (`toEmail`) in the config file? https://github.com/craftcms/contact-form#overriding-plugin-settings  

---

## 1 answers

### Answer by username_3 on 2021-08-31. Score: 0

Please check the attached screenshot.

[![enter image description here](https://i.sstatic.net/mMjAr.png)](https://i.sstatic.net/mMjAr.png)

In your craft cms Admin panel Go to Settings -> Email as shown in the above screenshot. Please check that you have filled in all the detail in the email settings form. Also if you are using the SMTP as a transport type then you need to check the same SMTP is working with PHP code or not.

You can check the test email using the "Test" button at the bottom of the email setting page.

If nothing works for you then let me know more details so we can help.

Thanks.


---

