How to change sender mail id in magento 2
In Magento 2, you can change the sender email ID by modifying the admin_email
and contact_email
settings in the Magento configuration. Here are the steps:
Method 1: Using the Magento Admin Panel
- Log in to the Magento Admin Panel.
- Go to Stores > Configuration.
- In the Advanced section, click on System.
- Scroll down to the Email Options section.
- Update the Admin Email field with your desired sender email ID.
- Click Save Config.
Method 2: Using the Magento CLI
- Open a terminal or command prompt.
- Run the following command to update the
admin_email
setting:php bin/magento config:set admin/email [email protected]
Replace
[email protected]
with your desired sender email ID.
Method 3: Editing the Magento configuration file
- Open the
app/etc/env.php
file in a text editor. - Find the
admin_email
setting and update it with your desired sender email ID:'admin_email' => '[email protected]',
- Save the file.
Method 4: Updating the contact email
- Open the
app/etc/env.php
file in a text editor. - Find the
contact_email
setting and update it with your desired sender email ID:'contact_email' => '[email protected]',
- Save the file.
After updating the sender email ID, you may need to clear the Magento cache to apply the changes. You can do this by running the following command:
php bin/magento cache:clean
Note that these changes will affect the sender email ID for all Magento emails, including system emails, contact form emails, and order confirmation emails.