Jump to content

Send mail automatically, after X days from a order.


3msweb

Recommended Posts

Hi guys, 

 

i want to send an email at my client when it has bought on my website after 6 days.

 

I have create this query:

SELECT ps_orders.id_order, ps_orders.id_customer, ps_customer.email, ps_orders.date_addFROM ps_orders
INNER JOIN ps_customer
ON ps_customer.id_customer=ps_orders.id_customer
WHERE DATE(ps_orders.date_add) <= DATE_SUB(CURDATE(), INTERVAL 6 DAY) AND ps_orders.current_state = 5 
ORDER BY `ps_orders`.`date_add`  ASC LIMIT 0, 100000
This results, shows all orders from X to 6 days ago that they are in the current_state = 5, like SHIPPED.
 
 
How can I configure a CRON job that send in automatic the same mail for all this result?
 
Can you help me?
Edited by 3msweb (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...