dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 63 forks source link

Don't specify SMTP login credentials if none are configured #564

Closed steverobbins closed 4 years ago

steverobbins commented 4 years ago

We use an SMTP server that uses IP whitelist for authentication, not a username/password.

When sending an empty username and password, this causes an authentication failure.

This PR will omit the username and password settings if they are not required.

sta1r commented 4 years ago

Hi @steverobbins pls can you confirm a couple of things:

Thanks

steverobbins commented 4 years ago

Yes, it is enabled. I can confirm the error is coming from Dotdigital, as each mail sending attempt results in an error in var/log/connector.log

dotdigital.INFO: TransportPlugin send exception: 5.7.3 Authentication unsuccessful


Yes, we have configured the other form fields, setting the host, port, and debug. See attached screnshot (hostname has been redacted):


We are using the version that comes with Magento Community 2.3.4, which appears to be Dotdigitalgroup_Email 4.1.0


Additional information

We had to switch to a different module that works when username/password is unspecified.

They too noticed this issue, and solved it in a similar fashion:

Essentially, I'm just porting over a bug fix other SMTP modules have encountered.

sta1r commented 4 years ago

@steverobbins Thanks for the background here.

In more recent versions of our connector - 4.4.0 (which is bundled with Magento 2.3.5) and 4.5.1 - we've actually further locked down our SMTP configuration. This was at Magento's request, to tighten security.

See: https://github.com/dotmailer/dotmailer-magento2-extension/commit/f8d5168e5a08aba006d6bd2a128fb493c3b7b935, https://github.com/dotmailer/dotmailer-magento2-extension/commit/e39522d2b2f8a217829a85d893fb7db054adf028

So as of the current version, our Transactional Email config only works with an 'smtp.dotdigital.com' hostname, with username/password auth.

I'm going to have to close this, but I hope the other module works out for you.