954,190 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mailtos from windows box

Hi All,
i want my virus scanner to run an exe after completeing some tasks, it has the capacity to do this.
what i want is a program that will pick up the user name and mail a simple message, 'done', to my mail account. i am struggeling to find out how to do this, can anyone suggest a program, a language or batch file line to acheve this. i am not a programer, but not inexperianced eather. any lines of code would be helpfull

cheers

spikes

spikes
Junior Poster
106 posts since Jul 2003
Reputation Points: 11
Solved Threads: 2
 

I've never done anything like this via windows before. My guess, however, is that you would need some form of mail or SMTP server (perhaps the one built-into IIS?) What VirusScan program are you using?

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

using NAI enterprise virus scanner 7.0, it will allow you to enter the name of a program that you wish to run after a successfull update, i just want to know which of my users have updated and which havent.

spikes

spikes
Junior Poster
106 posts since Jul 2003
Reputation Points: 11
Solved Threads: 2
 

I'm writing the program now... :-)

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

Okay, I'm done. The program can be downloaded here: http://tekmaven.dizla.com/emailer.zip

The only thing it requires the .NET Framework v1.1 (free download at Microsoft.com).

The ZIP file has 3 files in it: Emailer.exe, EmailerSettings.exe, and settings.config. To use emailer, extract it anywhere on your hard drive, and run EmailerSettings.exe. The Settings app will read the config file, and show you the settings. Adjust the settings for your needs. Below is an image of the settings app:

[img]http://tekmaven.dizla.com/EmailerSettings.JPG[/img]

Next, set the virus scanner to execute Emailer.exe. When the virus scan finishes, emailer.exe will read the settings, send the email, and exit. It looks like this while sending the email:

[img]http://tekmaven.dizla.com/emailer.JPG[/img]

I hope this is what you wanted :-).

Also, if Mr Gates (the TTF User) sees this, I will be releasing the VB.NET Source Code later today.

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

When ya get a chance, reply and tell me if this is what you needed.

I just want some satisfaction 8) .

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

Hi there,
Thank you so much for your help on this, but unfortuneatlywhen it ran it genarated the following:

application has generated an exception that could not be handled

process id = 0x754 (1876), thread id =0x74c (1868)

any ideas?

this was run on a win2k machine with the .NET framework in place

cheers

spikes

spikes
Junior Poster
106 posts since Jul 2003
Reputation Points: 11
Solved Threads: 2
 

Is it the .NET Framework 1.1? It has just recently came out, try doing a windows update, it will appear in the reccomended updates.

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 
Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

Hi,
I've installed the exe for .NET 1.1 that you gave me the link for and unfortuneatly the exception is still there.

Is there anything i can do to help solve this?, or is there another way of codeing the program.

cheers

spikes

spikes
Junior Poster
106 posts since Jul 2003
Reputation Points: 11
Solved Threads: 2
 

I have updated the original zip file with a new emailer.exe file that will tell you the error when it occurs. It can be downloaded here: http://tekmaven.dizla.com/emailer.zip

The problem that you are having is most likely to do with your SMTP Server. Either it doesn't exist, or it can't be properly connected.

What STMP server address are you using?

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

Hi,
Sorry it was just me being an idiot, it was the smtp address that i had enterd wrong. the mailer works a treat. thankyou for you hard work.

also, what software do you need to write programs useing the .NET framework, is it just the sdk from microsoft, and if so is it hard to learn the language?

again many thanks

spikes

spikes
Junior Poster
106 posts since Jul 2003
Reputation Points: 11
Solved Threads: 2
 

Well, you don't need any software, just a text editor and the SDK to compile apps, but this is often very unrealistic. In actuality, you need a development enviornment, Visual Studio .NET 2003, which runs for about $500-$5000, depending on the version you want.

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You