# How to Test Send Email Cron Job

**URL:** https://forum.mautic.org/t/how-to-test-send-email-cron-job/9962
**Category:** Product Support
**Created:** [November 23, 2017, 7:11am UTC](https://forum.mautic.org/t/how-to-test-send-email-cron-job/9962 "2017-11-23T07:11:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![npracht](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/npracht/32/240_2.png) [@npracht](https://forum.mautic.org/u/npracht)
#### Post date: [November 23, 2017, 7:11am UTC](https://forum.mautic.org/t/how-to-test-send-email-cron-job/9962/1 "2017-11-23T07:11:09Z")

</div>

Hi,  
  
  
  
I am new to Mautic. I have read its documentation and it looks that it will help me a lot. I have created campaigns and segments having contacts in it. When I select segments in campaign the issue is contacts added in segments are not showing in campaigns. Secondly I have setup cron job for send email. My question is how we can test that cron job is setup properly and working fine. Cron job for send email set as:

- 
  - 
    - 
      - 
        - /etc/php /var/www/html/mautic/app/console mautic:email:send --env=prod  
  
  
  
Thank You,

---

<div class="post-metadata">

### Author: ![npracht](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/npracht/32/240_2.png) [@npracht](https://forum.mautic.org/u/npracht)
#### Post date: [November 23, 2017, 7:11am UTC](https://forum.mautic.org/t/how-to-test-send-email-cron-job/9962/2 "2017-11-23T07:11:09Z")

</div>

Hi,

I am new to Mautic. I have read its documentation and it looks that it will help me a lot. I have created campaigns and segments having contacts in it. When I select segments in campaign the issue is contacts added in segments are not showing in campaigns. Secondly I have setup cron job for send email. My question is how we can test that cron job is setup properly and working fine. Cron job for send email set as:

- 
  - 
    - 
      - 
        - /etc/php /var/www/html/mautic/app/console mautic:email:send --env=prod

Thank You,

---

<div class="post-metadata">

### Author: ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)
#### Post date: [November 23, 2017, 12:55pm UTC](https://forum.mautic.org/t/how-to-test-send-email-cron-job/9962/3 "2017-11-23T12:55:10Z")

</div>

first of all that cron job is for send emails in Queve Mode.

To test create a test campaign and use the builder to make a simple workflow for sample Form Fill \> Send Email

---

<div class="post-metadata">

### Author: ![npracht](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/npracht/32/240_2.png) [@npracht](https://forum.mautic.org/u/npracht)
#### Post date: [November 23, 2017, 2:29pm UTC](https://forum.mautic.org/t/how-to-test-send-email-cron-job/9962/4 "2017-11-23T14:29:24Z")

</div>

Thanks ninjoan,

I have setup cron properly. Now I am facing an issue while importing contacts From SuiteCRM to Mautic.

Enabled features  
1- Triggered action push contacts to integration Checked  
2- Pull contacts from integration Checked  
3- Push contacts to this integration Checked

Choose SugarCRM objects to pull contacts from  
1- Leads Checked  
2- Contacts Checked  
3- Accounts Checked

So when I run cron job like:  
php console mautic:integration:fetchleads --fetch-all --integration=Sugarcrm

## it return me this result

Command to fetch contacts from integration  
Fetch contacts command is starting  
PHP Notice: Undefined variable: RECORDS\_LIST\_NAME in /var/www/html/mautic/plugins/MauticCrmBundle/Integration/SugarcrmIntegration.php on line 724

0 contacts were updated and 0 contacts were created

Fetching companies  
Fetch companies command is starting

0 companies were updated and 0 companies were created

* * *

So what I am doing wrong that contacts are not importing into Mautic?
