Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:45:50+00:00 2026-05-25T11:45:50+00:00

My question is about abstract software engineer point of view : Suppose I want

  • 0

My question is about abstract software engineer point of view :

Suppose I want to send an email after each insertion of row to a table.

Which approach will be smarter and “by the book” ?

  1. create a C#/CLR assembly which will send mail
  2. enable the CLR in SQL Server
  3. create trigger after insert, using that assembly’s function to send mail

or

  1. in C# application program itself , after the insertion to DB – send the email.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:45:50+00:00Added an answer on May 25, 2026 at 11:45 am

    Use Database Mail, which is a built in emailing solution for SQL Server, if you’re going to do the emailing from the server (rather than writing your own solution).

    This, at least, ensures that delivery of mail is asynchronous with respect to the rest of your transaction, so would be safe to call from a trigger or stored proc, without breaking either of these if the email delivery takes a while to succeed.


    As to, now, the decision of whether you should use this, called from a trigger or stored proc, or do the work in the application, it depends on which you’re more comfortable with. In either case, you need to consider the various failure conditions rather than just the happy path. If the SQL portion succeeds, and then the application crashes (or is killed through task manager) before it sends the email, how serious a failure would that be? What mitigating steps would you have to put in place?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Unit testing Abstract classes in Groovy I asked a question previous about unit testing
I have a question about .net generics. Consider the following code: public abstract class
This is not yet another question about the difference between abstract classes and interfaces,
Question about OO design. Suppose I have a base object vehicle. And two descendants:
This question is related to the post about having abstract at the titlepage. I
( DISCLAIMER : This is NOT a question about understanding the difference between abstract
This is a fairly abstract question, I hope it is within bounds. I'm about
a question about class design. Currently I have the following structure: abstract Base Repository
Got this interview question which i'm wondering about: A software company designed an app
I've got a question about accidentally hiding abstract methods. I'm creating a basic Entity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.