Answered by:
Send mail on future date..

Question
-
User-1441883313 posted
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
Friday, December 21, 2012 2:34 AM
Answers
-
User-1662538993 posted
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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, December 21, 2012 12:37 PM -
User-1000095884 posted
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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, December 25, 2012 3:55 AM
All replies
-
User-654786183 posted
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
Friday, December 21, 2012 2:39 AM -
User-1441883313 posted
not working
Friday, December 21, 2012 3:31 AM -
User-654786183 posted
What is the error you are getting?
Friday, December 21, 2012 3:43 AM -
User-1441883313 posted
message not sending it remains in queued
and i want to send on date arrives
Friday, December 21, 2012 3:49 AM -
User-1662538993 posted
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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, December 21, 2012 12:37 PM -
User-1441883313 posted
thanks for reply
How to create such web serivce.. Please explain
Saturday, December 22, 2012 1:41 AM -
User-1000095884 posted
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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, December 25, 2012 3:55 AM