.net mail classes vs SQL sp_send_dbmail

We have applications that from time to time must send email notifications. We use .net mail classes, but lately we have encountered the problem of some virus blockers blocking port 25. For me, the right solution is to set the correct exclusion rules so that our application continues to work. However, some fear that this could be a huge problem in the future, especially in connection with the emergence of new organizations, and would prefer to use SQL dbmail. I don’t really like this choice, I would prefer the application to handle this aspect, but I'm not sure if he should fight. Are there any real benefits of using .net mail in SQL mail?

+4
source share
4 answers

You must ask yourself the following question

Do I really want to use a database server to send email?

It all depends on how many letters you will send and how busy the SQL server is.

If you will not send a lot of letters, and you have a rather quiet SQL server; go straight ahead.

If (like most of us), you're out of luck, then look elsewhere.

+1
source

You can configure a dedicated mail server, isolate it from the network, with the exception of certain IP addresses, and only for incoming connections on port 25. I think this is quite safe. Even if you go to the SQL server, you open port 25 and you will be vulnerable. You (your compartment) can manage risks, rather than hide them.

+2
source

Both are SMTP solutions using port 25.

You will have the same problem, most likely it depends on where the scanner checks / blocks

+1
source

My thoughts are to reverse engineer this aspect of the system so that email requests are queued in the database table and one machine processes them.

Benefits:

  • You do not need to bind resources on your SQL Server processing volumes by email.
  • you do not need to go through a set of documents / exceptions for all client machines, only the one that will actually do the job.

Downsides:

  • more work for your developers!
0
source

Source: https://habr.com/ru/post/1339079/


All Articles