Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

My asp.net application is running on a shared hosting server.

and I want to send automatic email to my users. for example: who has 30 days left to their account expiry.

I know how to send email but how can I send it automatically, without any users interaction??

where shall I write the code??

any suggestions??
Posted
Updated 24-Sep-13 1:33am
v2
Comments
[no name] 24-Sep-13 11:08am    
If whatever database you are using does not support something like the SQL Server job agent then you should ask your hosting provider what it is that they would support for this type of functionality (I doubt that they would support anything at all but does not hurt to ask).

See this link

Sheduled emails in particular days later[^]

Regards..
 
Share this answer
 
You could try Quartz Scheduler for .NET here:
http://quartznet.sourceforge.net/[^]
Its easy to use, just add a couple of dlls in your application, create a Quartz Simple Job that checks your database for any records that meet your "Send Email" condition and that's it.
Worked for me :)
Take a look, good luck
 
Share this answer
 
v2
write a console application to send emails and, in server you can schedule to run it using Windows Task Schedular. Schedule the task to run the application in midnight and application will send the emails.
 
Share this answer
 
v2
Comments
Jaypal@18 24-Sep-13 7:39am    
it is possible in shared hosting server.

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