Solved

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

Posted on 2004-09-16
19
1,060 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 5
  • 2
19 Comments
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 12081171
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 96

Expert Comment

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

http://www.gboban.com/
0
 

Author Comment

by:dezmay
ID: 12081352
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 23

Expert Comment

by:Danny Child
ID: 12082816
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 96

Expert Comment

by:Lee W, MVP
ID: 12083329
Emailed.
0
 

Author Comment

by:dezmay
ID: 12089792
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 96

Expert Comment

by:Lee W, MVP
ID: 12089808
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
ID: 12090898
hi there,

could send me some example on how this program works? thanks...
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 12091730
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
ID: 12108049
hi there i am new in this. could you kindly teach me on how to know my smtp mail server? thank you...
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 12109484
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:Danny Child
ID: 12116805
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 96

Expert Comment

by:Lee W, MVP
ID: 12116905
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
ID: 12118458
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 96

Expert Comment

by:Lee W, MVP
ID: 12118560
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 96

Accepted Solution

by:
Lee W, MVP earned 125 total points
ID: 12118575
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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