Version: (using KDE KDE 3.5.1) Installed from: Gentoo Packages OS: Linux KMail disallow sending mails when the recipient's name contains an "@" character, thinking that is the address that contains two "@". It's easy to reproduce, just try to send a mail setting the To field to "flameeyes\@gentoo.org" <flameeyes@gentoo.org> . While it's rare to be done in actual mail's but it's unfortunately common for an italian webmail to set the default from value to the above example (with the real address of the sender, obviously), thus blocking on reply.
Created attachment 14449 [details] Proposed patch Okay tonight I found some time and I wrote the attached patch, it's a rewrite of the KPIM::isValidEmailAddress() function, replacing the stateful parser with some regexps. It doesn't seem to decrease performance noticeably, and it does not fail in the situation it was failing before, and mails are sent fine.
*** Bug 124572 has been marked as a duplicate of this bug. ***
Hi, can someone please review this patch?
Sorry, but your patch is not acceptable. If you want to know how a regular expression for checking the validity of RFC822 addresses looks like take a look at http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html. And no, we don't want to have this regular expression in KMail. Please try to fix the parser instead of trying to replace it by something else.
I checked with KDE 4.3. I can send a mail with "flameeyes@gentoo.org" <adress> , so I consider the main problem solved. I cannot send an mail like "flameeyes\@gentoo.org" <adress> , but that's a problem with the backslash.