In configuration, if email domain name contains accented characters, test mail doesn't send any mail, nore display any message (no success message, no error message).
Other use of phpmailer will throw "This is already a Punycode string" error.
Test message sent and success message displayed.
No error message, no email sent
Joomla 4.0.4,
When trying to send mail via phpmailer, libraries/vendor/algo26-matthias/idna-convert/src/Punycode/ToPunycode.php throw AlreadyPunycodeException, so email sending process stops.
As email is stored in database in 'punycode format', phpmailer will never send mail.
Replacing line 37 "throw new AlreadyPunycodeException('This is already a Punycode string', 100);" by "return false" should solve this issue.
Labels |
Added:
No Code Attached Yet
|
Title |
|
Title |
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-12-13 17:33:14 |
Closed_By | ⇒ | alikon |
@conseilgouz :This issue is still in version 4.1.4.
Looks like the PR was not merged.
Should I open a new Issue or can someone please reopen it.
Status | Closed | ⇒ | New |
Closed_Date | 2021-12-13 17:33:14 | ⇒ | |
Closed_By | alikon | ⇒ |
reopened
done
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-06-01 14:46:01 |
Closed_By | ⇒ | alikon |
another way to fix it is to check string before calling IdnaConvert in libraries/src/String/PunycodeHelper.php
public static function toPunycode($utfString) { if (!preg_match("/[[a-zA-Z0-9-]+$/", $utfString)) { return (new ToIdn)->convert($utfString); } return $utfString; }