Solved

Email thru dos batch file with attachment... please help...

Posted on 2004-09-16
19
1,053 Views
Last Modified: 2008-01-09
good day to all,

could someone hellp me regarding my problem. Because everyday im sending an email to my boss email address using yahoo and attaching a file config.txt generated by our POS server for everday report. what i want to do is...

1. emal my boss using dos batch file....
2. attached the config.txt to the email....
   note:config.txt located at the sub-directory \control
3. should be no ms dos box arround when running(annoying)...
4. should work on any windows platform.... (for future use)...

please help me with this problem of mine. it will help me less my stress at work. not minding email at my boss everyday...

i will add a point on whom help me best.

sorry for my english. thank you..
0
Comment
Question by:dezmay
  • 9
  • 5
  • 2
19 Comments
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
Download GBMailer - it's a free DOS command line mailing program.  I use it in several scripts.  The message sent is always the contents of a txt file, so it will easily read the config.txt file and send that.

You'll get the dos box, but it should only run briefly, especially if you run the script as a task in task scheduler of XP.  

It's compatible with virtually all Windows OSs.

0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
Sorry - forgot the link - look at the bottom of the page

http://www.gboban.com/
0
 

Author Comment

by:dezmay
Comment Utility
hi leew,

i try to download the file but it seems the zip file is corrupted. could you please email to me your copy? or is there any site that can download the same file? please help sir. my email address are tweatums27@yahoo.com.

hope to hear from you soon.

more power...
0
 
LVL 23

Expert Comment

by:DanCh99
Comment Utility
Bmail works ok, uses a file to create the message body:
http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

or MAPISEND from the Exchange Resource Kit - needs a MAPI client like Outlook installed as well.
0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
Emailed.
0
 

Author Comment

by:dezmay
Comment Utility
hi there,

thanks for the mail. the program i think is asking for a mail server is that right? is there any universal mail server that i can use? so i could use the program wherever i go? not familiar with this kind of thing just want to do email from dos mode... thanks.
0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
No idea of "universal" smtp server - you will need a mail server of some sort - try the one you use to send a regular email from that computer.  The utility is NOT an SMTP server, but does require one.  You might be able to install one on the PC and use itself.
0
 

Author Comment

by:dezmay
Comment Utility
hi there,

could send me some example on how this program works? thanks...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
gbmail -v -to myboss@bossesemail.com -file mailmsg.txt -h smtp.isp.com -from me@myemail.com -s TheSubjectWithoutSpaces

-v = optional, says to be "verbose" in executing the command so you see everything that's happening
-to = required, email address of the person you are sending the message to
-file = the file name containing the message you want to send
-h = the smtp mail server you are going to use.  
-from = your email address
-s = subject of your message - never figured out how to include spaces, so I never do.  I just capitalize each work.
0
 

Author Comment

by:dezmay
Comment Utility
hi there i am new in this. could you kindly teach me on how to know my smtp mail server? thank you...
0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
Who is your e-mail with?  Hotmail?  Yahoo?  Road Runner Cable?  Etc.?  If it's a webmail service, such as yahoo or Hotmail, this won't work.  If it's road runner or another "pop3"/'"SMTP" mail system (earthlink I think would be this way), then you'll have one.

What operating systems are you using?  Windows XP, 2000 Server, 2000 Pro? NT 4 Server?  If you are using a server OS - AND it's on the internet, you can setup an SMTP server on it and then use that.  If not, you'll have to find an open SMTP server (most smtp servers are closed - spamers like to send spam from open ones, so people don't allow just anyone to use them).
0
 
LVL 23

Expert Comment

by:DanCh99
Comment Utility
If you're doing this in a work environment as your post suggests, the easiest way to find your smtp server is to grab a techie and ask them!  if this doesn't work, tell us a bit about your email setup and we'll see what we can do....

If you're doing it from a more public area, say from a home pc, then follow leew's advice.  Tell us which  email program you use (outlook, for example) too!
0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
I'm assuming the environment he's isn't large enough to have a techie.

If you aren't using webmail, try specifying the smtp server as smtp.isp.com - for example, if you use earthlink, try smtp.earthlink.com.  BUT there's no guarentee that the ISP has chosen to name their SMTP server "SMTP" - they could just as easily name it "bob" - but MOST do use SMTP.isp.com.
0
 

Author Comment

by:dezmay
Comment Utility
hi to all,

well thank you and very sorry that i didnt give any data from the start.

i am using a yahoo service and a windows 98 se os. thank you very much...

and using a modem to connect to the internet with a prepaid card to surf. thank you. and more power...
0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
Check this out (Yahoo doesn't provide SMTP services to the best of my knowledge)
http://www.faqs.org/faqs/privacy/anon-server/faq/use/part4/section-12.html
0
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 125 total points
Comment Utility
You can also look into installing one of these systems and then you would specificy the SMTP server as "localhost"

http://www.postcastserver.com/html/download.asp
http://www.filetransit.com/view.php?id=20906
http://www.download.com/1st-SMTP-Server/3000-2367-10264282.html
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now