When the customer record has the checkbox checked for email in the preference tab.

then the email will be sent for the transactions.
for transaction the to be emailed will be checked on transactions.
if the transaction on create needs to be emailed to the customer, then the script usage of user event before Load and client script page init will only work on created from transactions whereas the setting the to be emailed on create in these triggers and by adding the customers on standalone transactions would reload the page and will set the to be emailed according to the customer preferences