• Sort of a Moment 22 then?

    How would you know if the address is valid without trying to send it? Only the mailserver knows if it can send the mail or not.

    However, if you wonder about how to validate a string to be conformant to a valid address (ie that the 'format' is right), then yes, you can do this in T-SQL.

    Personally, I store emailddresses in a column which has a CHECK constraint that prevents malformed addresses to be entered.

    That way I don't have to validate when I pick them up from there.

    It looks like this:

    ALTER TABLE dbo.myTable

    ADD CONSTRAINT CHK_email CHECK

    ( = ' ' or is null

    or ( like '[a-zA-Z0-9]%@[a-zA-Z0-9]%.%[a-zA-Z0-9]')

    and ((not(( like '%[ ]%'))))

    and ((not(( like '%@[/\$#!~&(){},;*=]%'))))

    and ((not(( like '%[[]%'))))

    and ((not(( like '%..%'))))

    and ((not(( like '%]%'))))

    and ((not(( like '%@%@%')))))

    BTW, while I'm at it.. Can anyone point me in the right direction where I can change the webinterface for posting to a more userfriendly format?

    Currently I have a single line and have to type HTML tags by hand to get anything near readable This really s*cks bigtime.

    =:o/

    /Kenneth