Click here to Skip to main content
15,925,201 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
How to get the details from datagridview and send them as an attachment through email in windows application.


And the mail should be sent automatically for every 30 minutes.?

Help me out to do this.
Posted
Comments
CHill60 28-Feb-13 4:50am    
If you type email c# in the Search for articles, questions, tips box to the top right of your screen you will find many examples of solutions to this question within CodeProject.
Orcun Iyigun 28-Feb-13 4:51am    
Calm down :) What have you tried?[^]

 
Share this answer
 
Comments
Harsha24 28-Feb-13 5:13am    
it's working great.. thanks & cheers Ol
Get the details is a case of reading the Rows, and then the Cells property for each row. You can then assemble them into file-based format for an attachment - I can't be specific becuase you don't tell us what kind of attachment you are intenf=ding to use.

Send the email is simple: Sending an Email in C# with or without attachments: generic routine.[^]

And all you have left to do is set up a timer, set it to an interval of say one minute, then count thirty of them before sending the email.
 
Share this answer
 

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