This question already has an answer here:

I followed this article to create a database mail for SQL Server Express 2017.

I got it working but before that I had tried to create accounts and different profiles.

How I do I list all database mail profiles id and account ids so I can delete the old messed up ones.

marked as duplicate by LowlyDBA, mustaccio, Michael Green, hot2use, Colin 't Hart Jan 21 at 11:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The documentation has great explanations of all the stored procedures you need to create, view, or delete profiles and accounts. – LowlyDBA Jan 18 at 14:39
  • Thanks! would i have to just delete the account id? Would that take of the Profile associated it with. It didnt specify on the article – Oldtrafford345 Jan 18 at 15:03
  • 1
  • Perfect thanks exactly what i was looking for – Oldtrafford345 Jan 18 at 15:31