I want to build a routine that send email automatically to those email addresses. Call the report and export the output in memory. I get an email with a message, but it doesn't contain attachment. You're going to have to base64 encode the attachment and create the MIME headers.
module' If you send email to a user, her preferred language should be fine, so use \Drupal\Core\Session\AccountInterface::getPreferredAdminLangcode(). You can: Send the same file attachment to all recipients. Drupal send email attachment While working on a Drupal project my task was to enable the Drupal feedback module and when a feedback is added by a user, send a mail to corresponding email id.