There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
DOS/PDA/Other
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
Send e-mail through batch file / command line


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
equama's Avatar
Junior Member with 2 posts.
 
Join Date: Dec 2003
19-Dec-2003, 04:18 PM #1
Send e-mail through batch file / command line
Hi. Is anyone aware of an easy way to send an e-mail through a command line?

I have a user that creates a zip file every couple of days which is then sent to me via FTP. The process is done with wzzip.exe through a little batch file that I created.

Since the FTP is not exactly reliable from this client, I would like that same batch file to somehow initiate an e-mail to be sent every time this zip file is created.

That way I know to look for an incoming file through the FTP transfer.

Thanks for your time.

Brian - equama
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
19-Dec-2003, 07:33 PM #2
I use a freeware utility called GBMailer. Google for it. It accepts all the parameters from the command line and sends mail through any smtp server.
mole's Avatar
Senior Member with 795 posts.
 
Join Date: Aug 1999
Location: Indian Head, MD "The land of large boxes."
30-Dec-2003, 07:45 PM #3
I'm not familiar with GBMailer, but do advise that many formerly "open" SMTP servers now require authentication. This is to reduce open relaying of SPAM. Some command line mailers do not support or may not work well with SMTP servers requiring authentication. Conversly, not all SMTP servers have authentication properly configured either. "Blat" is another command line mailer that I use.

You could also run your own SMTP server with authentication or IP security set so only you can use it and relay to an authenticated SMTP server. This is complicated, but will do the job.

A nice FTP utility that works very well with batches and other scripts is WebDrive - http://www.southrivertech.com/ It isn't free, but is easier than writing the FTP script from a batch as you can map your FTP server to a drive letter.
__________________
mole
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
31-Dec-2003, 06:27 PM #4
Good tip mole, thanks.

I don't mean to suggest that I'm a spammer. We (my company) sends a lot of system generated email to our stores. The messages come to my process en-masse as ascii and I parse the file for each individual store and mail it out.
mole's Avatar
Senior Member with 795 posts.
 
Join Date: Aug 1999
Location: Indian Head, MD "The land of large boxes."
01-Jan-2004, 06:46 AM #5
Hi coderitr,

You being a spammer was furthest from my mind. People don't like/want SPAM and it is good the ISPs are locking down their SMTP servers. What often gets overlooked though are the legitimate uses of SMTP servers that were easy to connect to through simple command line mailers. I had to re-write many automatic email scripts I had running to notify me of critical points in scheduled tasks on my home network and the one I tend at work. None of these were SPAM related of course.

Another example of the internet becoming a more complicated place.

By this time I hope the OP has a solution.

Take care and happy New Year.
__________________
mole
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:40 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.