Showing results for 
Search instead for 
Did you mean: 
Create Post

Global SMTP server setting

Global SMTP server setting

There is a need for this, and I have seen several posts on it.  It is a huge pain to have to go individually into all currently configured alerts and change the SMTP server information.  I had to do this not too long ago for about 50 alerts (and that seems to be on the small scale).  It automatically changes for all newly created alerts, so why not the current alerts?  It would be nice to be able to change this for all alerts, configured and new.  Along with this comes the thought that you should also be able to set up a secondary SMTP server when the primary is unreachable.

Tags (1)
Level 10

I agree completely, this should be a single field to change along with the address that the alert is sent from as well.

Level 12

I have this code that I have adapted to hopefully help. PLEASE PLEASE Test before running this in production as I havent had a chance to test yet!!!




SET @OldServer = 'Exchange01'

SET @NewServer = 'Exchange02'

SELECT 'UPDATE dbo.ActionDefinitions SET Target=''' + (REPLACE(CAST(ACT.Target AS VARCHAR(MAX)),'SMTPServer:'+@OldServer+'','SMTPServer:'+@NewServer+'')) + ''' WHERE ActionDefID=''' + CAST(ACT.ActionDefID AS VARCHAR(MAX)) + ''''

FROM dbo.AlertDefinitions AS ALD

JOIN dbo.ActionDefinitions AS ACT

ON ACT.AlertDefID = ALD.AlertDefID

WHERE ACT.ActionType = 'EMail'

AND ACT.Target LIKE '%SMTPServer:'+@OldServer+'%'

Level 7

I can't believe there is no simple solution for this. Ridiculous.

The query I used to update ours based on the info above and from other sources was:

UPDATE [Orion].[dbo].[ActionDefinitions]

SET [Orion].[dbo].[ActionDefinitions].Target = REPLACE(CAST([Orion].[dbo].[ActionDefinitions].Target AS VARCHAR(MAX)),'','')

WHERE [Orion].[dbo].[ActionDefinitions].Target LIKE ''

Level 7

The workaround I've used is to install the IIS SMTP service on the Orion server, allow the Orion server to relay, and configure it to use a smart host.  I can then use as the SMTP server in all alerts.

Level 13

I know that this is in NPM, but it is also needed in NCM.  I just ran into an issue where even though I changed the SMTP server address in the settings, it did not change it for currently configured jobs.  Those all had to be manually edited.

Level 10

Wish I could vote more than once for this..

Level 10

Voted up.  Have multiple email alerts I need to update because our Excahnge team is deploying new SMTP servers.  A single global parameter would have been a real time saver.

I think it should automatically change the smtp server information only on the alerts that are configured to use that same smtp server.  For example – you have 100 alerts that are using and 30 alerts that are using  If changing global smtp server had changed all the alerts then you have to go back and change the other 30 alerts back to the way you wanted them.

Level 20

I guess this also assumes every alert is going to the same smtp server then?  For most people this is probably the case but I'm sure not all.