How to send a Order Email to a Custom Email Address

The following steps shows you to send a order email to a custom Email in Magento 2

Step 1: built a form by an Email input field  line

Step 2: built a file “app\code\\Webnexs\TipAndTrick\Controller\Order\Email”

 In magento admin page it only supports send Email to the Email address in order. So if you want to send order Email to Email address you need to write a custom code to do it.

Create an form with a Email Input field in the below

<form id="send-order-email" action="<?php $block->getUrl('tipandtrick/order/sendemail'); ?>">

    <label>Email Address</label>

    <input type="text" class="input-text" id="email">


namespace Webnexs\TipAndTrick\Controller\Order;

class Email extends \Magento\Framework\App\Action\Action

Then built a file “app\code\\Webnexs\TipAndTrick\Controller\Order\Email

which Extends class


to grab a submit action of above form

I write an execute function to execute to execute submit form action , the following code :

public function execute()


        $email = $this->getRequest()->getParam('email');

        $order = $this->_objectManager->create('Magento\Sales\Model\Order')->load(1);


        if ($order) {

            try {



                $this->messageManager->addSuccess(__('You sent the order email.'));

            } catch (\Magento\Framework\Exception\LocalizedException $e) {


            } catch (\Exception $e) {

                $this->messageManager->addError(__('We can\'t send the email order right now.'));





I hope the above mentioned step helps you to send an Order Email to a custom Email .






Leave a Reply

Your email address will not be published. Required fields are marked *