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

  1. Log in to the Magento Admin Panel.
  2. Go to Stores > Configuration.
  3. In the Advanced section, click on System.
  4. Scroll down to the Email Options section.
  5. Update the Admin Email field with your desired sender email ID.
  6. Click Save Config.

Method 2: Using the Magento CLI

  1. Open a terminal or command prompt.
  2. 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

  1. Open the app/etc/env.php file in a text editor.
  2. Find the admin_email setting and update it with your desired sender email ID:
    'admin_email' => '[email protected]',
  3. Save the file.

Method 4: Updating the contact email

  1. Open the app/etc/env.php file in a text editor.
  2. Find the contact_email setting and update it with your desired sender email ID:
    'contact_email' => '[email protected]',
  3. 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.