<ValidateProperties(
"Validate"
})> _
Public
Class
ScriptMain
...
Public
Function
Validate(
ByRef
errMessage
As
String
)
As
Boolean
Dim
result
As
Boolean
result =
False
If
String
.IsNullOrEmpty(
Me
.FromSender)
Then
errMessage =
"Please specify FromSender."
ElseIf
String
.IsNullOrEmpty(
Me
.ToRecipient)
Then
errMessage =
"Please specify ToRecipient."
ElseIf
String
.IsNullOrEmpty(
Me
.Subject)
Then
errMessage =
"Please specify Subject."
ElseIf
String
.IsNullOrEmpty(
Me
.Message)
Then
errMessage =
"Please specify Message."
Else
result =
True
End
If
Validate = result
End
Function