Gets or sets the Boolean property value that specifies whether mail accounts that are referenced by mail profiles are included in the generated script.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
The following code example specifies that mail accounts which are referenced by mail profiles will not be scripted.
Dim scOps As New ScriptingOptions() scOps.NoMailProfileAccounts = true
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions $scOps.NoMailProfileAccounts = $TRUE