Okay, so, as I understand it you want a test that:
1) Takes one parameter that is the data to be used for the test (an e-mail address)
2) Inputs the data into the AUT
3) Checks for the error message
4) Determines, using potentially another parameter, whether the test passed.
So, I see something like this (delphiscript)
function TestEmail(EmailAddress, AddressIsValid):boolean;
var
AppAUT,
EditForm,
ErrorForm;
begin
AppAUT := Sys.Process('MyApp');
EditForm := AppAUT.VCLObject('EmailInputForm');
EditForm.EmailEdit.wText := EmailAddress;
EditForm.OKButton.ClickButton;
ErrorForm := AppAut.WaitVCLObject('ErrorMessageWindow', 5000);
//If the address is valid but we get the error message, then the test failed
if AddressIsValid then begin
Result := AddressIsValid and (not ErrorForm.Exists)
else
Result := AddressIsValid and ErrorForm.Exists;
end;
That's just a rough-out. May need some tweaking but that's how I'd handle it.