Summary: | Check validity recipient addresses before sending mail | ||
---|---|---|---|
Product: | [Applications] kmail | Reporter: | Dik Takken <kde> |
Component: | composer | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Dik Takken
2005-02-06 21:06:57 UTC
CVS commit by mdouhan: Update the validator to disallow foo:@mydomain try and help the user a bit to not make mistakes and get weird and wonderful SMTP error msgs BUG:98720 M +7 -0 email.cpp 1.27 M +2 -1 email.h 1.12 --- kdepim/libemailfunctions/email.cpp #1.26:1.27 @@ -321,4 +321,8 @@ KPIM::EmailParseResult KPIM::isValidEmai } break; + case ':' : + if ( !inQuotedString ) { + return DisallowedChar; + } case '<' : if ( !inQuotedString ) { @@ -467,4 +471,7 @@ QString KPIM::emailParseResultToString( "does not seem to contain an actual email address, i.e. " "something of the form joe@kde.org."); + case DisallowedChar : + return i18n("The email address you entered is not valid because it " + "contains an illegal character."); } return i18n("Unknown problem with email address"); --- kdepim/libemailfunctions/email.h #1.11:1.12 @@ -47,5 +47,6 @@ enum EmailParseResult { AddressOk, Addre TooManyAts, UnexpectedComma, TooFewAts, MissingLocalPart, - UnbalancedQuote, NoAddressSpec }; + UnbalancedQuote, NoAddressSpec, + DisallowedChar }; // Helper functions > i18n("The email address you entered ....
Which address? Would it be possible to actually tell the user which address the message is referring to? In case you have a subtle typing error in a whole bunch of recipient addresses it's not very convenient if you have to go and search for mistakes.
That is exactly what happens, in the msgbox that appears the offending email address is shown in bold so that you can edit that single address and do not have to look through all your addresses. Wow, that's perfect. Thanks! This patch introduces a bug (118284) which prevents valid RFC 2822 group addresses from working, e.g. Committee List: foo@bar.org, bar@baz.com; That whole line is a valid group address according to section 3.4 "Address Specification", defined as: group = display-name ":" [mailbox-list / CFWS] ";" It would be nice if Kmail/Kontact was RFC 2822 compliant.. |