Ok. I may have a temporary solution….do at your own risk, but I got email to send. thanks to @cmtcav for his warning message I was able to remove source of error. MAKE A COPY OF THE WHOLE PHP FILE BEFORE ATTEMPTING! I am using SendinBlue for email, but may work for others. I am using the FREE version of WP-SMPT also…it may change the code that I removed which I listed below.
Go to your directory:
wp-content / plugins / wp-mail-smtp / vendor / guzzlehttp / guzzle / src / Client.php
In Client.php remove lines 218-248
Error resolved…
HONEST MOMENT: I have no clue what those lines do. Thats why I say do at your own risk. Looks to be some sort of error checker.
Hope it gets people to sleep earlier tonight. Lol.
HERES THE CODE I REMOVED IN CASE IT APPEARS DIFFERENTLY ON YOURS:
if ($uri->getHost() && isset($config[‘idn_conversion’]) && ($config[‘idn_conversion’] !== false)) {
$idnOptions = ($config[‘idn_conversion’] === true) ? IDNA_DEFAULT : $config[‘idn_conversion’];
$asciiHost = idn_to_ascii($uri->getHost(), $idnOptions, INTL_IDNA_VARIANT_UTS46, $info);
if ($asciiHost === false) {
$errorBitSet = isset($info[‘errors’]) ? $info[‘errors’] : 0;
$errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
return substr($name, 0, 11) === ‘IDNA_ERROR_’;
});
$errors = [];
foreach ($errorConstants as $errorConstant) {
if ($errorBitSet & constant($errorConstant)) {
$errors[] = $errorConstant;
}
}
$errorMessage = ‘IDN conversion failed’;
if ($errors) {
$errorMessage .= ‘ (errors: ‘ . implode(‘, ‘, $errors) . ‘)’;
}
throw new InvalidArgumentException($errorMessage);
} else {
if ($uri->getHost() !== $asciiHost) {
// Replace URI only if the ASCII version is different
$uri = $uri->withHost($asciiHost);
}
}
}
-
This reply was modified 4 years, 11 months ago by lonnie1972.
-
This reply was modified 4 years, 11 months ago by lonnie1972.
-
This reply was modified 4 years, 11 months ago by lonnie1972.
-
This reply was modified 4 years, 11 months ago by lonnie1972.