The error:
In the /admin/settings/smtp, if the SMTP server field has spaces before of after the value, the SMTP module will be unable to connect, throwing the following error:
SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
SMTP Error: Could not connect to SMTP host.
The (temporary) solution
The error is easily solved: simply remove any whitespace in the field, and things work fine.
I'm not sure if the other fields suffer from the same problem.
I guess a simple trim() would fix things, but don't know where that should be.
Comments
Comment #1
oadaeh commentedThanks for the update. Probably the port number could benefit from a trim() function, as well. I'll include the fix in the near future, but for those playing at home, I changed this:
to this:
at around line 758 of smtp.module.
Comment #2
simon georges commentedPatch provided implementing the suggestion above.
Regards,
Comment #3
wundo commentedClosing very old (dead) issues, if you think this is still relevant please re-open.