I wish to automate sending of mails, so want to create a
batch file.
The manual way is as follows:
telnet localhost 25
helo me
mail from:ro...@msfsr.mycompanydomain
rcpt to:shah...@appprod.mycompanydomain
Data
Subject:This is a test
Testing
.
quit
How do I make it into a batch file or script?
TIA & Rgds,
Shahril
Oli
"Shahril" <shah...@spower.com.sg> wrote in message
news:073001c36075$e16ea1f0$a401...@phx.gbl...
I don't think there is a way of scripting the standard Microsoft
telnet client (although some people in the past have come up with some
VB scripts which issued SendKeys commands - ugly).
I suggest you use a comms program, and among those I would use Kermit.
See : http://www.columbia.edu/kermit/ckermit.html and
http://www.columbia.edu/kermit/ckscripts.html
Unfortunately, the Win32 version (Kermit95) is not free; you'll
probably find others which are, but I can't comment on those.
--
Michael Bednarek, IT Manager, Tactical Global Management
Waterfront Pl, Brisbane 4000, Australia. "POST NO BILLS"
http://mcmbednarek.tripod.com/
set mail = createobject("CDONTS.NewMail")
mail.to = "te...@test.com"
mail.from = "fr...@test.com"
mail.body = body
mail.subject = subject
mail.send
set mail = nothing
>-----Original Message-----
>Hi folks,
>
>I wish to automate sending of mails, so want to create a
>batch file.
>
>The manual way is as follows:
>telnet localhost 25
>helo me
>mail from:ro...@msfsr.mycompanydomain
>rcpt to:shah...@appprod.mycompanydomain
>Data
>Subject:This is a test
>
>Testing
>
>..
>quit
>
>How do I make it into a batch file or script?
>
>
>TIA & Rgds,
>Shahril
>
>.
>
>Hi,
>Use vbs file to send emails.
>Use command line arguments to send variables,
>But i don't remember how to get command line arguments
>right now :(
>
>set mail = createobject("CDONTS.NewMail")
>mail.to = "te...@test.com"
>mail.from = "fr...@test.com"
>mail.body = body
>mail.subject = subject
>mail.send
>
>set mail = nothing
I think this requires that the following items are installed:
1. Windows Scripting Host (WSH) - most probably true
2. IIS or Exchange - unlikely
And what about this remark: "Please avoid using CDONTS.NewMail... it
is wrought with problems, and is obsolete (it is no longer included in
Windows XP or Windows Server 2003)." from
http://www.aspfaq.com/show.asp?id=2119.
Which mail server?
On Thu, 14 Aug 2003 01:35:39 GMT, Michael Bednarek <m...@tgm.com.au>
wrote:
Maybe but probably not; he wants to contact an SMTP server manually
which is the WORST way to send spam. Ok, in a batch it is a little
better but there are plenty of programs that automate this much better,
even Outlook or Outlook Express can use long CC: or distribution
lists.
He probably wants to test the email server or just doen't
have an email user agent (client program) on a particular
machine.
> >>I wish to automate sending of mails, so want to create a
> >>batch file.
> >>
> >>The manual way is as follows:
> >>telnet localhost 25
> >>helo me
> >>mail from:ro...@msfsr.mycompanydomain
> >>rcpt to:shah...@appprod.mycompanydomain
> >>Data
> >>Subject:This is a test
> >>
> >>Testing
> >>
> >>.
> >>quit
> >>
> >>How do I make it into a batch file or script?
> >
> >Which mail server?
YOUR approved email server -- the same SMTP
server you would use if you were setting up Outlook,
or your favorite email client program.
You put all the stuff in a text file and use the COMMAND
line version of Telnet or better yet, NetCat (nc.exe).
What are you REALLY trying to accomplish with this
and we can tell you the best tool.
Your best bet is to use a DOS mailer tool that will handle this for
you, easily. Try this command line email program for Windows,
NetMailBot:
"Shahril" <shah...@spower.com.sg> wrote in message news:<073001c36075$e16ea1f0$a401...@phx.gbl>...
You might want to go a bit cheaper...as in free.
Blat (version 1.94)
> http://www.interlog.com/~tcharron/blat.html
Microsoft's Smplmapi (sounds like MAPI instead of SMTP and
I haven't tried it)
> http://pages.infinit.net/che/blat/blat.html#download
And of course just a script fed to NetCat
> http://packetstormsecurity.nl/UNIX/netcat/
> http://packetstormsecurity.nl/UNIX/netcat/nc11nt.zip