magepal / magento2-gmail-smtp-app

Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
https://www.magepal.com
319 stars 147 forks source link

If you lock the active flag, test mail sending is not working #123

Closed amenk closed 6 years ago

amenk commented 6 years ago

Magento version #:

2.2.5 CE

Expected behavior:

When I lock the config setting "active" (via .env) I can send testmails

Actual behavior:

Not working

Steps to reproduce:

n98-magerun2 config:set -l system/gmailsmtpapp/active 1

Send Testmail in Backend

Debugging

public function validateModuleEmailStatus()
{
    $result = $this->error();

    if (!$this->getRequest()->getPost('active')) {
        $result = $this->error(
            true,
            __('SMTP module is not enabled')
        );
    }

    return $result;
}

The value is no longer in the POST when it is locked -> we have to check something else

srenon commented 6 years ago

@amenk ... I will look into this shortly

validateModuleEmailStatus(), just do a post-check to make sure all the other setting are correct

    public function verify()
    {
        $settings = [
            'server_email' => 'validateServerEmailSetting',
            'magento_email_setting' => 'validateMagentoEmailStatus',
            'module_email_setting' => 'validateModuleEmailStatus',
            'magento_email' => 'validateMagentoEmailSetting'
        ];
srenon commented 6 years ago

@amenk ... Please update to v2.5.4 and let me know if you are still having issues.

amenk commented 6 years ago

It did not help

Module is enabled via env.php

its_enabled

When I click "send test email"

error

srenon commented 6 years ago

@amenk ... Sorry about that ... please update to 2.5.5

image