When sending mail using system.net. Having specified from attribute in system.net->mailsetting->smtp. In send method we have to pass from address once again, so what is the purpose of specifying it in the config?
<smtp deliveryMethod="Network" **from="xyz@xyz.com"**>
<network host="smtpout.secureserver.net" port="80" userName="xyz@xyz.com" password="xyz-password" />
</smtp>
If the from address never changes, this is a good place to set it.
Many applications send email from a single account, so configuring it there instead of hard coding it makes sense.
This value is used in the parameterless constructor of
MailMessage.