horst-n / WireMailSmtp

ProcessWire: Extension to the new WireMail baseclass (since PW 2.4.1)
15 stars 9 forks source link

Updated for longer TLDs #20

Closed Notanotherdotcom closed 7 months ago

Notanotherdotcom commented 9 months ago

The regex here was capping TLDs with a low length of up to 6 characters whereas the longest TLD in existence is 24 characters. I've suggested 24, but the longest theoretical at the moment appears to be 63 so maybe that's the correct number: https://stackoverflow.com/a/22038535

At the moment the module simply shortens addresses with longer TLDs like .solutions etc and caps them at 6 chars instead of erroring, so it becomes .soluti instead. Since I use this alongside Postmark it is actually quite helpful to see the message attempt, but I think it should maybe write to a log if stuff like this crops up to make it easier to spot - not sure what's best really.

Jason found the issue by the way so credit to him: https://processwire.com/talk/topic/5704-wiremailsmtp/?do=findComment&comment=237791

Notanotherdotcom commented 7 months ago

@horst-n sorry to nudge, but can this be merged please? 🙏🏻