You can enable and disable outgoing emails for each environment from the Project Web Interface or from the command line. Enable outgoing emails for integration and staging environments to send two-factor authentication or reset password emails for Cloud project users.
By default, outgoing email is enabled on Production environments. The Outgoing emails may appear Off in the environment settings regardless of status until you set the
The deployment process begins when you perform a merge, push, or synchronization of your environment, or when you trigger a manual redeployment, during which the Commerce application is in maintenance mode. For a Production environment, Adobe recommends completing this work during off-peak hours to avoid service disruptions.
Use the Outgoing emails toggle in the Configure environment view to enable or disable email support.
To manage email support from the Project Web Interface:
Log in to the Project Web Interface
Click the project.
In the left environment list, click the name of the branch.
To enable or disable outgoing emails, toggle Outgoing emails On or Off.
After you change the setting, the environment builds and deploys with the new configuration.
You can change the email configuration using the
environment:info command to set the
enable_smtp property. Enabling SMTP updates the
MAGENTO_CLOUD_SMTP_HOST environment variable with the IP address of the SMTP host for sending mail.
To manage email support from the command line:
On your local workstation, change to your project directory.
Change the email support configuration by setting the
enable_smtp environment variable to
magento-cloud environment:info --refresh -p <project-id> -e <environment-id> enable_smtp true
Wait for the environment to build and deploy.
Use an SSH to log into the remote environment.
Verify that the email works; send a test email to an address that you can check.
php -r 'mail("firstname.lastname@example.org", "test message", "just testing", "From: email@example.com");'