Closed hobeone closed 9 years ago
There is no real validation done. There are just two types of errors that are currently returned when sending an email: a missing From
field and a malformed recipient address.
I do not see the real value of exposing a validation function since checking for a From
field is pretty trivial and a well-formed recipient address does not mean the address exists.
What kind of validation would you like?
Currently the a Message is only checked for validity when it is sent and all the logic for validation is in the Mailer.Send() function. It seems that this might be more useful to pull put either into it's own set of functions or as a function of the Message struct.
This would be useful when you want to check the validity of a message without sending it. - i.e. check that a message is valid and present a user of what they need to fix if it isn't.