Why there is “from” attribute of <smtp> element in <system.net><mailSettings>? How can i use it?
As far as i see, i anyway have to specify From parameter for MailMessage class constructor.
Can i use “from” attribute of <smtp> element for this in any natural way?
Why there is from attribute of <smtp> element in <system.net><mailSettings>? How can i use
Share
There is an overload of the MailMessage constructor that doesn’t require any parameters. This will set the From property to the value in your .config file. See here for more information, particularly the “Remarks” section:
http://msdn.microsoft.com/en-us/library/ms144707.aspx