I want to fire a auto mail after checking a file Exist in a folderpath in asp.net
Loading
I want to fire a auto mail after checking a file Exist in a folderpath in asp.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Sep 15, 2023, 7:45 AM
You can use the FileSystemWatcher class in C# to monitor a folder for new files. You will need to define the folder path you want to monitor and set up event handlers for the Created event, which is triggered when a new file is added to the folder.
For example:
Amit MohantyPosted Sep 15, 2023, 11:24 AM
Hey Sandeep, self-reliance is a key aspect of problem-solving. Use the given example as a template to work through the problem independently. If you run into challenges or get stuck, remember that we're here to offer support and guidance, not to simply provide complete solutions.
Sandeep KumarPosted Sep 15, 2023, 10:36 AM
I want to Send a latest file in mail also suppose Budeget.txt,Budget(1).txt in this case latest Budget(1).txt i have to check weather file exist then mail sent
Sandeep KumarPosted Sep 15, 2023, 7:23 AM
My Requirement Is to send mail automatically when file Fall in a Folder path (which means latest file).
every a day 3 to 4 times file fall in folder whenever file file fallen then mail should fire with latest file name,
may be file name like,Budget.txt, first time
2nd time File name may in fole like Budget(1).text like this way
Mohammad HussainPosted Sep 14, 2023, 6:53 AM
Amit MohantyPosted Sep 14, 2023, 6:46 AM
Could you please explain what you have accomplished so far and please provide enough code so others can better understand the problem.