[ENH] SMTPClientSenderBracket-nk ([er][et][sm][sl] Looks good;
test attached)
Lex Spoon
lex at cc.gatech.edu
Mon Mar 22 19:13:17 UTC 2004
> > from preamble:
> >
> > "Change Set: SMTPClientSenderBracket-nk
> > Date: 17 March 2004
> > Author: Ned Konz
> >
> > Allows sender email addresses of the form
> >
> > ""Someone"" <someone at somewhere>
> >
> > or
> > <someone at somewhere>
> >
> > as well as
> >
> > someone at somewhere
It would seem even better to use the existing MailAddressParser, which
does full parsing of Internet email addresses. Here's an example usage
from MailMessage:
recipients
^ (Set withAll: (MailAddressParser addressesIn: self to))
addAll: (MailAddressParser addressesIn: self cc);
yourself
I do not have a good feel for how much parsing SMTPClient should be
doing, but if it is going to do parsing, it seems you may as well use
the full parser. FWIW, writing a full mail-address parser is
surprisingly difficult.... you wouldn't want to start with something
"simple" and then fix case after case.
-Lex
More information about the Squeak-dev
mailing list
|