August 19, 2020 at 4:50 pm
...smtp codes like we used to do earlier.
Earlier than when? What sort of SMTP codes?
Can you clarify a little?
August 19, 2020 at 10:42 pm
Normal means - smtp codes server name
like the below mention method but on the above code but in the above code i am unable to understand it.
https://www.sqlshack.com/configure-database-mail-sql-server/
could you please help me to understand from the code i posted how it going to send an email
August 20, 2020 at 1:13 am
I'll start off by saying that, once you've eliminated the double spacing, the first 463 lines of code are all a part of the dbo.sp_send_dbmail stored procedure, which is a system stored procedure that you must not change.
As for the rest of it, it's creating reports as to if and when backups were created and whether or not they were successful or not and then they each us dbo.sp_send_dbmail to send someone the report.
In order for this to work, you need to setup mail for the server. In order to do that, you're going to have to get with the folks in your infrastructure group and have them tell you what the smtp server name is and a couple of other things.
To do that, see the follow Google search page for help... you should go through it before you hit up the infrastructure folks for the smtp information I told you about above...
https://www.google.com/search?&q=set+up+mail+in+sql+server+2017
The link that you provided also has some good information in it but the smtp information you're looking for is esoteric to your company and the infrastructure folks that setup you email will have the information you need. If your email is in the cloud, then call your cloud provider for the information (the folks in infrastructure might also have that info so check with them first).
--Jeff Moden
Change is inevitable... Change for the better is not.
August 20, 2020 at 11:19 am
Hi Expert,
My Question was where smtp it suppose to be configure or it is calling via some store procedure and how it is called from SP
Shree
You need to configure database mail via T-SQL or the GUI in the Management->Database Mail area.
The first hit in Jeff's link he kindly posted will point you to these three links on configuring database mail
Then you call sp_send_dbmail with the right accounts/profiles needed to send mail
August 20, 2020 at 11:50 pm
thank you so much for perfect answer!!
Viewing 6 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply