How can I send an email automatically from C#?
For example, when new data is inserted into my database I want my aplication to send an automatic email containing that data.
maybe this is very easy, after successful insertion you send email
begin try
' insertion code
' after it sending mail code =)
end try
begin catch
end catch
How do you sent an automatic email at a set period of time with the inserted, deleted or modified DATA from my database?
for this, can little complicate :
0) you need to know Timer control (this timer
http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx)
1) and Global.asax Application_Start
what you do? you create a Timer put your code in it =) (with timer you can create easy scheduled tasks) and finally ouuff! start it in
Application_Start