Is it possible for me to pull the values that are in:
Central Admin -> System Settings -> Configure outgoing e-mail settings
from my code behind using the object model?
Make sure that you have already configured the “Outgoing e-mail settings”.
Yes, look for properties of SPAdministrationWebApplication, you can access it using SPAdministrationWebApplication.Local. Properties are:
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
If you want to update the settings, you need to call UpdateMailSettings method.
In SharePoint you can configure the outgoing email settings at two locations in the Central Admin.
Via the code from Falak Mahmood you can access this later one.
If you need to access the global settings, you can do it either via the SPGlobalAdmin class:
Or you can access the corresponding properties of the
Note, that the mail related properties of
or set the corresponding properties directly, like