Order is a key part of any Ecommerce store, once an order is placed & gets confirmed store owner delivers the product at the customer’s doorsteps. But because every store doesn’t have the same order process that’s the reason why Magento 2.x comes with a preloaded option for customizing order email templates that will constantly serve updates to your customers on each order status change. Not, only this, you can also set email sender if required.
But if you are using an older version of Magento and switched to latest Magento 2.2.x you will face an issue “Confirmation emails have no FROM or FROM email address 2.2.4 #14952” also this request was officially pulled in Magento 3 Github by @tstamplis. It means even if you set up your own sales order email sender, Magento will send an email using default server sender i.e.apache@domainname but other emails except sales are working perfectly fine. Because we have seen lots of people are facing the same issue we have decided to write a blog about.
Firstly, we have to create custom extension for this purpose and after that create “module.xml
file at this path inside your extension folder.
app\code\Vendor\Extension\etc\module.xml

Now, create one more file “di.xml” in same extension folder.
app\code\Vendor\Extension\etc\ di.xml

Now in this third step create “TransportBuilder.php” file at this path using given code.
app\code\Vendor\Extension\Rewrite\Framework\Mail\Template\TransportBuilder.php

Now, in fourth and last step create SenderBuilder.php at this path.

app\code\Vendor\Extension\Rewrite\Sales\Model\Order\Email\SenderBuilder.php

That’s it! After creating custom extension using above code, your Magento 2 will start sending sales order email to your customers from define email sender.

Lastly, If you found this blog helpful, don’t forget to share it with your colleagues and Magento Friends.

And, Let us know if you are facing an issue while implementing this code.

Happy Fixing!

Click to rate this post!
[Total: 17 Average: 4.5]