0

I'm using the SMTP Authentication Support plugin for mail from my Drupal 8 server.

Sending mail from a webform works fine as long as the visitor is using the default language, which is English. It does not send when using any other language.

The message in the error log is not helpful:

Error sending e-mail from email@site.com to email@site.com: SMTP Error: Could not connect to SMTP host.

This makes no sense to me. How can it not be connecting, when the same connection information is ok on English?

How can I resolve this? Here's what I've tried to do:

  • I've asked for support on SMTP's issues page, but have not received any response yet.
  • Set the language detection up two different ways: by domain or by URL. Same result on both.
  • Tried two different SMTP servers, with the same result on both.
  • Tried SSL and standard protocols for SMTP.
  • What major version of Drupal are you asking about? (6, 7, 8) – LittleCoding Jan 3 '17 at 16:54
  • @LittleCoding - I'm sorry. It's for Drupal 8. – croceldon Jan 3 '17 at 17:35
2

The problem is that the parameters are not translatable. In my case it has been solved by overriding the values of the port and protocol variables in settings.php.

$config['smtp.settings']['smtp_port'] = '587';
$config['smtp.settings']['smtp_protocol'] = 'tls';
0

I applied this patch https://www.drupal.org/node/2865696

After that I copied smtp.settings.yml in the language folder, and I launched drush cim.

I don't know if you use cim/cex for configuration management, but in this way I can send email in other languages

0

Just for someone who is using Drupal 7 to fix the same issue, because this module's Drupal 7 version does not even have that stupid smtp.schema.yml file. For Drupal 7, go to /sites/all/modules/smtp and in that folder, edit the file called smtp.phpmailer.inc. Find out "Sets connection prefix." and change the "public $SMTPSecure = '';" into "public $SMTPSecure = 'ssl';". Then remember to clear the cache and reenable the SMTP module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.