Mime Mail is not completely ported to D8 yet but there is a patch that ports the Rules support at https://www.drupal.org/project/mimemail/issues/2928965
If you need this feature I suggest you contribute to that issue.
It is possible to send email via SMTP using Outlook's SMTP server. Make sure you have set Swiftmailer to send mail via SMTP.
SMTP server: smtp-mail.outlook.com or smtp.office365.com
Use your Hotmail address and password to log in. You'll probably need to enter your Hotmail address under "Configuration" -> "Basic site settings".
$invoice_pdf = File::load($fid); // the file id
$invoice_file = (object) [
'filename' => 'invoice.pdf',
'uri' => $invoice_pdf->getFileUri(),
'filemime' => $invoice_pdf->getMimeType(),
$message['params']['files'] = $invoice_file;
'files' must be an array, that's were I had the most difficulties with. Full code here: Send e-mail with ...
It looks like the issue lies with the SMTP module. The release notes for 8.x-1.0-beta6 include a bug fix for:
#2993124 by jmuzz, qichanghai, Chris Matthews: Call to Undefined Method error _get_components when there is a BCC
I guess negative because the post lack of details. Including Drupal Core version (6, 7, 8, 9 ?), name of the modules used to send mails (and it's version), which are required to provide some help/assistance, excpectally if you're not very familliar with Drupal :)
You're saying running the site under local environment, does it provide a mail-sender ? If not, ...