Results 1 to 2 of 2

Thread: Sending report using auto email in windows application?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    208

    Cool Sending report using auto email in windows application?

    I want to get code that works for sending auto email.
    i want to send reports automatically per month.
    i am developing rent management system, i want to know the report between two dates and i generate it in my application, now i want to send it to my email automatically every month, could someone do it how it could be?
    first how can i send plain messages automatically every hour?
    then my second question how can i send it with auto generate report and attachment?
    please my knowledge is limited help me in coding it? thanks

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

    Re: Sending report using auto email in windows application?

    If you want to do something every hour then you'd want to use a Timer and handle the appropriate event. You could use a Windows.Forms.Timer and handle its Tick event but you may be better off using a Timers.Timer and handling its Elapsed event. That's because the latter raises events on secondary threads by default, which means that your report generation and emailing won't freeze the UI.

    As for sending the email, check out the documentation for the System.Net.Mail.Attachment class, which has a code example.
    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