Create a console app with your logic that will check the date of birth and send an email if it is the day.
Schedule this console app to run every 24 hours and then it will run once in a day, you can change this how many times it will run and do the necessary job.
You can create windows service and achieve the same thing.
As kushalrdalal suggested above, you can use windows service to achieve the goal. Create a web service for email sending, and another project to trigger and call the service and use Windows Service to control the timer.
nandkumar.22
Member
15 Points
60 Posts
Send mail on future date..
Dec 21, 2012 06:34 AM|LINK
i have table customerinfo
(
custid int,
name varchar(),
DOB datetime
)
i want to send mail when birthdate comes.
Please help..
How is it possible with webservices...
Thanks in advance
senthilwaits
Contributor
3832 Points
651 Posts
Re: Send mail on future date..
Dec 21, 2012 06:39 AM|LINK
You can use SQL Server Jobs to check the data in your table and send mails.
Please refer
http://www.codeproject.com/Articles/29060/SQL-SERVER-2008-Configure-Database-Mail-Send-Email
http://msdn.microsoft.com/en-us/library/ms190307.aspx
Senthil Kumar Sundaram
nandkumar.22
Member
15 Points
60 Posts
Re: Send mail on future date..
Dec 21, 2012 07:31 AM|LINK
not working
senthilwaits
Contributor
3832 Points
651 Posts
Re: Send mail on future date..
Dec 21, 2012 07:43 AM|LINK
What is the error you are getting?
Senthil Kumar Sundaram
nandkumar.22
Member
15 Points
60 Posts
Re: Send mail on future date..
Dec 21, 2012 07:49 AM|LINK
message not sending it remains in queued
and i want to send on date arrives
kushalrdalal
Contributor
7130 Points
1273 Posts
Re: Send mail on future date..
Dec 21, 2012 04:37 PM|LINK
You can do something like this -
Create a console app with your logic that will check the date of birth and send an email if it is the day.
Schedule this console app to run every 24 hours and then it will run once in a day, you can change this how many times it will run and do the necessary job.
You can create windows service and achieve the same thing.
My Blog
LinkedIn Profile
nandkumar.22
Member
15 Points
60 Posts
Re: Send mail on future date..
Dec 22, 2012 05:41 AM|LINK
thanks for reply
How to create such web serivce.. Please explain
Haixia Xie -...
Contributor
3031 Points
296 Posts
Microsoft
Re: Send mail on future date..
Dec 25, 2012 07:55 AM|LINK
Hi,
As kushalrdalal suggested above, you can use windows service to achieve the goal. Create a web service for email sending, and another project to trigger and call the service and use Windows Service to control the timer.
#Email Sending Web Service
http://www.codeproject.com/Articles/30758/Email-Sending-Web-Service
Below blog provide a sample to create a simple windows service.
http://www.codeproject.com/Articles/3990/Simple-Windows-Service-Sample
Best Regards.
Feedback to us
Develop and promote your apps in Windows Store