Problem with sending the invoice to the customer from email

I have added an invoice function to my website, and everything works well (Print, Export to HTML, and Export to PDF) except for email. When I choose to send the invoice as an email to the customer, the customer receives the invoice as an exported HTML file. How can I ensure that the customer receives the regular invoice instead of an HTML file?I created an invoice in the custom view, but it is not being emailed to the customer when I try to send it.I mean there is no option to send an email under Tables > Custom Template.

Sorry do not understand your question. Are you talking about Custom View or Custom Template? They are different concepts. Please explain more clearly what you are trying to do.

I have a page where you can enter your details, price, etc., and from those details, an invoice is created. At the top, I have placed a dropdown where you can choose whether you want to print, export, or email the invoice. Printing and exporting works, but emailing does not. How can I fix this? I have created the invoice in the view page > custom template.

have already fix it.