Results 1 to 2 of 2

Thread: how to send weekly report automatically using c#?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    208

    Thumbs up 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.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width