I have a problem while scripting a database with the smo.scripter class. One table contains a Stored procedure wich uses 'msdb.dbo.sp_send_dbmail'. I use the scripting options 'Withdepencies = true' and 'allowsystemobjects = false'. The result of this is that the syntax to create the sp 'msdb.dbo.sp_send_dbmail' is included in my database script. This is not wath I want. There seems to be no option to exclude "Cross-database dependencies". Any idea how I could avoid this behavior?