Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All
I wanted to send Automatically background email in Asp .net MVC using database field date every day if data has inserted into database.
We have already established a sending email for based on login , now we need to send based on all records inserted into DB,
Note : I am using Asp .net MVC(C#) and Asp .net core in my project.

Your help will be very appreciated .

Thanks

What I have tried:

I have tried a single image mail based on login, now i needed to send list images which data has inserted into DB for a particular day or week.
Posted
Updated 20-Dec-18 17:13pm
Comments
RmcbainTheThird 19-Dec-18 13:54pm    
Does your db tables include as lastUpdated and a UpdatedBy column ? If so then this work would be better done by a scheduled job that scans your db for updated records and send out emails

1 solution

You may want to take a look at SignalR with SqlDependency to listen to any database change and perform whatever actions you want. Here are a few articles that you can refer to get started:

(1) SignalR Database Update Notifications in ASP.NET MVC using SQL Dependency[^]

(2) Database Change Notifications in ASP.NET using SignalR and SqlDependency - TechBrij[^]

(3) Real Time Notifications using SignalR and SQL Dependency[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900