Checking From.Address will cause an error if From has never been set and is still null. Trying to explicitly create a new MailAddress object in the From field to satisfy this check by passing in null MailAddress(null) or an empty string MailAddress(string.Empty) will both cause errors as well, there should be no condition under which From.Address is ever null or empty.
Checking
From.Address
will cause an error ifFrom
has never been set and is still null. Trying to explicitly create a newMailAddress
object in theFrom
field to satisfy this check by passing in nullMailAddress(null)
or an empty stringMailAddress(string.Empty)
will both cause errors as well, there should be no condition under which From.Address is ever null or empty.