Normally I would do something like
<?php
use \Magento\Sales\Model\Order\Email\Sender\OrderSender;
use \Magento\Sales\Model\Order;
class MyClass
{
private $orderSender;
private $order;
public function __construct(
OrderSender $orderSender,
Order $order
) {
$this->orderSender = $orderSender;
$this->order = $order;
}
public function sendEmail($import, $orderItems)
{
$this->order->load($orderId);
$this->orderSender->send($order, true);
}
}
I have noted $this->order->load() has been deprecated but $this->orderSender->send() expects \Magento\Sales\Model\Order
Therefore my question is how would I send order confirmation emails without using deprecated methods.
Also as a note "Asynchronous sending" for is disabled Sales Emails