How to configure mail on Azure SQL Database
Asked Answered
D

1

3

We are moving from Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) to Microsoft SQL Azure (RTM) - 12.0.2000.8

Previously we send mail from database mail if a particular table have not updated in a particular time interval.

But i tried to do the same on Azure mail but seems like this functionality is not available on this.

Disenthrall answered 20/2, 2019 at 9:29 Comment(1)
Correct, sending email is not a feature of Azure SQL. You would need to run SQL as IaaS or write some integration with sendgrid (sendgrid.com/partners/azure) in order to mail out. Logic apps may give you a good framework to do this.Methodology
P
2

You can write a Stored Procedure to query the table and return results, read the results in an Azure WebJob, Logic App or Azure Function, schedule the execution and send the results via email. Here you can find an example using a Logic App and here you can find how to schedule it.

You can use your own Exchange/SMTP server or you can choose to use SendGrid to send out the email as shown here.

Plain answered 20/2, 2019 at 11:54 Comment(1)
I don't see how any of these examples show how to email the results of a query through SendGrid. The first example just sends a notification email to the admin or whoever created the logic app. The second just schedules it, and the third shows how to send email via SendGrid in C#.Maier

© 2022 - 2024 — McMap. All rights reserved.