0

Where do I click to send an Order Update email? I'd like to send an email to the customer when I post out their item.

1 Answer 1

3

how to send update mail in magento

 public function __construct(
  ....
 \Magento\Sales\Model\OrderFactory $orderFactory,
 \Magento\Framework\ObjectManagerInterface $objectManager, 
....
 ) {
....
$this->orderFactory = $orderFactory;
$this->_objectManager= $objectManager;
....
}

 public function execute()
   {  
    $order_sales = $this->orderFactory->create()->load($orderId);//your order id 
    $orderCommentSender = $this->_objectManager->create('Magento\Sales\Model\Order\Email\Sender\OrderCommentSender');
    $orderCommentSender->send($order_sales, $notify='1' , $comment);// $comment yout comment
   }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.