Hey Friends,
I just got a requirement where I was suppose to send an Email from SQL, So here in this Post I will share how to send an Email from SQL followed by another Post in which I will share How to execute it with a SQL Query.
So the first step you need to do is to open SQL Server Management Studio. Navigate to Management –> Database Emails as shown in the below screenshot.
Now either you can Right click on Database Email OR double click on Database Email to open the Configuration Wizard as shown above. Now simply push Next
As we are configuring it for the first time so we are good to go with the first option. Push Next.
Now here we need to Configure the SMTP Server with proper SMTP Credential. It’s almost the same configuration window which we use do define from NAV Side. After finishing this you need to push Next and afterwards you will get 2 more dialogue boxes where you have to do nothing and you just need to finish the configuration wizard.
Now you need to fire below SQL Query on Database msdb.
Now you are good to go and have completed all needed configurations to fire an email from SQL Side. See below screenshot to fire a test email.
Open Send Test E-Mail. Here you need to enter the recipient Email ID and push Send Test Email.
You will receive an Email.
P.S – You Should have desired Permission from SQL Side then only you can configure OR Use this Email Feature.
CHEERS.