Mautic Community Forums

Do not Contact as Filter/Column in Segments/Reports

At the moment, if you manually unsubscribe from Email a contact (API call or manually going into contact preferences or manually setting Do Not Contact in contacts view) there is no way to filter segments or reports based on this activity.

So like at the moment, I can not create a segment or a report that contains people that I manually/API unsubscribed. They are there in Mautic but I can not only display these contacts…

I think these groups of people would benefit from this idea: Anyone looking to do exports of contacts, have an overview of the amount of people in their DB that are DNC, …

Why I think they would benefit from this idea: I am assuming the only way to do this at the moment is to go in the backend and query the database somehow. Not even sure this is possible, I am not technical enough to do that.

Looking forward to know if I am the only one in this situation or if this has been a debated topic before…

Yes we would like this feature as well

1 Like

Hey Yaniss.

This would be an amazing feature to have, unfortunately it is not there yet. But as you mentioned you can go to the database and export these contacts.

They way you would do it would be if you have terminal access (via ssh or some other emulator)

  1. mysql -u root
  2. connect mautic_db_name
  3. select email from leads, lead_donotcontact where lead_donotcontact.lead_id =;

you can do this from the command line and drop all the results into a file like this:

mysql -u root -e “select email from leads, lead_donotcontact where lead_donotcontact.lead_id =” mautic_db_name >> donotcontact_list.csv

1 Like