Search code examples
c#database-mail

Sending E-Mail via DatabaseMail with C#


How can I send e-mails using Database Mail (which is integrated in SQL Server) in C# ? I couldn't find a useful article or something which can help me thoroughly.


Solution

  • I don't have any experience with Database Mail, so this is just from looking at this tutorial, but it seems like you could just Parametrize an ADO.NET SQL Query with whatever you're sending, and use ADO.NET to execute the SQL stored procedure for sending mail.