Smart fields are not working for user when emailing an invoice.
Smart fields are placeholder fields (variables) that allow Core to auto-fill them with IDs or values when emailing invoices, statements, reports, purchase orders or receipts. You can set them up in Global Settings or User Preferences.
The reason why the smart fields feature doesn't work in case of some invoices is that they are joint invoices (combined invoices) with multiple projects on them. So when you use smart fields and want Core to add Project Name or Project ID into the email text, it does not know which ID or name to retrieve as there are more than one project represented on the invoice. If you use the same fields on a regular invoice that covers one project only, it works fine.