Posted: 9/7/2010
Hi
I have seen 2 method to send email. One is from using C# or Vb.net code and other is using Sql server. In my project, there is Trail Registration page and i have to send auto generated Email to user before the Expiry date. I have used the "sending Email using C#". Is the good method to do this task ? or should i have to do using sql server database ?
Regards
Chandradev
Posted: 9/28/2010
hi Chandradev,
i think it's ok. you should try to use windows services to send auto generated mail based on Expirydate
Posted: 10/14/2010
Write a stored procedure and use sql job to send an email.
Posted: 10/15/2010
Yes. I think sending email using strore procedure will be faster as compare to C# method.
chandradev said: user="chandradev prasad"]Yes. I think sending email using strore procedure will be faster as compare to C# method.
user="chandradev prasad"]
Sayed Ali's method is very good.
Check this tutorial for step by step guide
http://www.howtogeek.com/howto/database/sending-automated-job-email-notifications-in-sql-server-with-smtp/
However, if you want to make changes in the future, you will need to edit the Job in the SQL Server Agent. Once the application is deployed, the client might not need to do that manually. Therefor, think to make it as much flexible as you can and provide ways for the Administrator to make manual configuration. Anyway, you might not need this depending of how you want to implement the feature ;).
Cheers,Hajan