MailMessage.ValidateMessage

ValidateMessage(string)

Validate eml message for corresponding to mime specification.

public static EmlValidationErrorCollection ValidateMessage(string fileName)
ParameterTypeDescription
fileNameStringA file name (eml).

Return Value

A EmlValidationErrorCollection containing the found validation error messages.

Exceptions

exceptioncondition
ArgumentExceptionfileName is null or empty.
FileNotFoundExceptionThe specified fileName doesn’t exist.

See Also


ValidateMessage(Stream)

Validate eml message for corresponding to mime specification.

public static EmlValidationErrorCollection ValidateMessage(Stream stream)
ParameterTypeDescription
streamStreamA stream containing the message in eml format.

Return Value

A EmlValidationErrorCollection containing the found validation error messages.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.

See Also