magento2 – Replaces the SenderBuilder class to add BCC when sending the invoice

I did not find any event when the billing email is sent. I have therefore tried to replace the Magento Sales Model Order Email SenderBuilder class. my localhost by in the development website (which is multistore), it did not work.
I do not know if there is a better solution to appeal to an observer if there is an event sending invoices by email.

so in my module

Vendor / ModuleName / etc / di.xml





In app / code / Vendor / ModuleName / Model / Sales / Order / Email / SenderBuilder.php

Wetag  InvoiceEmail namespace  Template  Sales  Order  Email;

the SenderBuilder class expands  Magento  Sales  Template  Order  Email  SenderBuilder
{



public function send ()
{


$ this-> configureEmailTemplate ();

$ this-> transportBuilder-> addTo (
$ this-> identityContainer-> getCustomerEmail (),
$ this-> identityContainer-> getCustomerName ()
)

$ copyTo = $ this-> identityContainer-> getEmailCopyTo ();

if (! empty ($ copyTo) && $ this-> identityContainer-> getCopyMethod () == & bcc & # 39;) {
foreach ($ copyTo as $ email) {
$ this-> transportBuilder-> addBcc ($ email);
}
}

if ($ this-> identityContainer instanceof  Magento  Sales  Template  Order  Email  Container  InvoiceIdentity) {
// do some stuff

$ objectManager =  Magento  Framework  App  ObjectManager :: getInstance ();
$ CustomerModel = $ objectManager-> create (Magento  Client  Model  Client & # 39;);

$ CustomerModel-> setWebsiteId ($ this-> identityContainer-> getStore () -> getStoreId ());
$ CustomerModel-> loadByEmail ($ this-> identityContainer-> getCustomerEmail ());
$ email = $ CustomerModel-> getData ()['invoice_email'];


if (! empty ($ email)) {

$ this-> transportBuilder-> addBcc ($ email);
}

}
$ transport = $ this-> transportBuilder-> getTransport ();
$ transport-> sendMessage ();
}
}