in reply to Re: Email::Valid, what am I doing wrong here?
in thread Email::Valid, what am I doing wrong here?

Sorry, I had responded without logging in first. I was pretty sure that this (allowing spaces) was intentional on the part of the programmer. My only concern was whther the 'space' was safe enough.

If I type a space (before or after the @) in the To field of a gmail 'compose' form, it gives me:

Some addresses in the "To" field were not recognized. Please make sure that all addresses are properly formed.
  • Comment on Re^2: Email::Valid, what am I doing wrong here?

Replies are listed 'Best First'.
Re^3: Email::Valid, what am I doing wrong here?
by Your Mother (Archbishop) on May 16, 2009 at 18:14 UTC

    And thus we discover one more thing Google does wrong. :) In this case you're talking to an application which has chosen its own limited filter heuristics. Passing the address to any mail transport agent should work. I just checked my own gmail address with extra spaces added sent from mail on the command line and it turned up in my box just fine.

      The reason why Google can do this, and make this rejection useful, if because Gmail is an interactive application. The spaces in an entered email address are indeed likely a mistake by the user, and he's given a chance to fix it, either way.

      But if the address was passed along to a mail server in batch, then it'd better accept it!

        Sincere thanks for the wisdom and for your patience with a novice.

        and he's given a chance to fix it, either way.

        Nope. foo @ example.org is misinterpreted as "foo "@example.org.

        Update: Oops, nevermind, that test wasn't done with gmail.