Peter J. Holzer wrote:
That was intended. RFC 2821 requires them, and being strict catches
quite a bit of spam.

That's what I figured, but it leads to the question of what the test in question is testing then:


        $as = '[EMAIL PROTECTED]'; # original form
        ok ($ao = Qpsmtpd::Address->parse($as), "parse $as");
        is ($ao && $ao->address, $as, "address $as");

I read the fragment above as testing that the $obj->address method returns just the address (without the delimiters), but since the Q::A->parse() method _requires_ the delimiters, the code should probably be changed to this instead:

        $as = '[EMAIL PROTECTED]'; # original form
        ok ($ao = Qpsmtpd::Address->parse("<".$as.">"), "parse $as");
        is ($ao && $ao->address, $as, "address $as");

since that will now correctly succeed, and correctly test the $obj->address() method.

I do find it is odd that new() also checks for the delimiters (and strips them if present), but doesn't call canonify() at all.

John

Reply via email to