|
-
Sep 30th, 2012, 10:22 PM
#1
Thread Starter
Addicted Member
how to send weekly report automatically using c#?
i am developing windows application using c# and sql server 2008.
i want to have a reporting formt.the application is just user registration form. i just want to report to a specific email every week what has been registered using the system.
please show me on how my system will report using
email weekly or monthly?
thanks for sharing ur knowledge for me.
-
Oct 1st, 2012, 12:52 AM
#2
Re: how to send weekly report automatically using c#?
First of all you have to initiate the process. To do that you could use a Timer in your application or use Windows Scheduled Tasks to run your app, perhaps with a special commandline argument, at regular intervals.
As for sending the report, email functionality is provided in the System.Net.Mail namespace, mainly via the MailMessage and SmtpClient classes. There are lots of examples around of their use, so you should start by checking those out and playing around a bit until you find what works for your situation. You can include HTML in the body of the email if you like or you can add attachments. When you look for examples, just make sure that they are for System.Net.Mail and not the obsolete System.Web.Mail.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|