customer total emails send in last month

AHK

Active Member
Hello,
is there a way to check customers total number of emails send between two dates (including bounces and test message) ?
if not i am thinking to create plugin for that and share here on forum may be other people also want it.
(Please do let me know here if any one like this idea?)
I am thinking to use query like this, @twisted1919 Please let me know is this correct query or there is batter way to do that? and this will calculate total number of emails send including bounces and test emails.

select count(log_id) from mw_campaign_delivery_log i
INNER JOIN mw_campaign s
ON i.campaign_id=s.campaign_id
where s.customer_id=1 and s.send_at BETWEEN '2017-08-01 00:00:00' AND '2017-08-31 00:00:00'


Plugin Idea is,
In backend/customers/index one new button will come for sending reports, when we click on that button, it will take customer ID, and then we select two dates range and submit and it will show total number of emails send in this period.
OR
have separate page where admin can select customer and two dates range and then it will show total number of emails send in this period.
which one batter way to do it ?

Thanks
 
Hello @twisted1919
Any update on my above email, as i need to do this, cause now i have customer who i will charge at end of month total emails send in last month.
so please help me in proper way and proper query to do that.
Thanks
 
You have to count the delivery logs for the customer:
Code:
select count(*) from mw_campaign_delivery_log i
INNER JOIN mw_campaign s
ON i.campaign_id=s.campaign_id
where s.customer_id=1 and date(i.date_added) BETWEEN '2017-08-01 AND '2017-08-31'
 
In backend/customers/index one new button will come for sending reports, when we click on that button, it will take customer ID, and then we select two dates range and submit and it will show total number of emails send in this period.
This option seems good (and perhaps even with backend allowing which customer/groups could see/use this button themselves).
 
Hey, is there any update on this? This feature is exactly what I need (how to count total sends for a single customer over a set period). If not, how do I use the aforementioned code? Is this a MySQL query?
 
Back
Top