Email alert on creation of sales invoice

hello guys.
When i create sales invoice email alert is sent to all customer. But we want email alert should be sent that particular customer.
i have set following condition
doc.customer_name== doc.customer
Thank you

Can you share the version of the erpnext and frappe you are running ?

also share the email alert you created

we are using v9 of erpnext and frappe.
and following are the email alert setting

In the first screenshot, in the Recipients table you haven’t set a Email by Document Field. Could this be the reason. Identify the exact field with the customer email and set it in that table.

Do one thing. Make a dummy customer with your own email and try it out.

Thanks for reply. it worked. But i need to add new contact for customer. is there any possibility that erpnext fetch the email address from address and contact (that is overridden in orange color in image)

I think it should. Create the contact and set it as the primary contact. Check if the same email field is being populated or not.

Thank you very much. i will try