Click here to Skip to main content
15,881,092 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im working on my little program and i need to know something!
I want the vb program to send a mail (automatically ) to my email every 5 min with a file (attachment .txt)
(sender username and password is alredy set in that application)
If anybody could tell me that i would be verry happy
Posted
Updated 22-Oct-13 1:07am
v2
Comments
ZurdoDev 22-Oct-13 7:40am    
Use a timer control.
Wombaticus 22-Oct-13 8:31am    
Or, (better, IMO), build the app to send just a single email, then run it as a scheduled task to execute every 5 minutes.
ZurdoDev 22-Oct-13 8:35am    
So, use Windows Timer instead. :)
[no name] 22-Oct-13 22:20pm    
scheduled task means??
Wombaticus 23-Oct-13 3:16am    
Gooogle "Windows Task Scheduler" for your operating system. It's a feature of Windows that allows you to run programs automatically on a schedule that you set - e.g. every 5 minutes, in your case.

I would recommend using a timer control and then even possibly create this as a windows service.
 
Share this answer
 
Comments
Ranjan.D 24-Oct-13 10:02am    
Perfect solution, Would recommend the same.
[no name] 24-Oct-13 11:36am    
need one more help, how can i attach a folder that contain several files )
or how can i attach all the .txt file in a folder for mailing (in VB6)
ZurdoDev 24-Oct-13 11:39am    
I would recommend opening a new question so that it shows up under the Unanswered questions and you'll get more responses. However, if you are using SMTP and the .Net MailMessage class there is an Attachments collection and I believe there are several articles on this site explaining how to do it.
thatraja 24-Oct-13 11:45am    
5!
This is perfect task for the the Windows Task Scheduler. See, for instance: "windows scheduler to run a task every x-minutes?" at Stack Overflow[^].
 
Share this answer
 
Comments
thatraja 24-Oct-13 11:46am    
5!
CPallini 24-Oct-13 12:11pm    
Thank you.

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