Operating System - Microsoft
1752579 Members
4441 Online
108788 Solutions
New Discussion юеВ

mailx equivalent under MS OS's

 
Daavid Turnbull
Frequent Advisor

mailx equivalent under MS OS's

I know this is a Unix forum but I am posting the question here because I expect that Unix gurus porting scripts to the Windows environment probably haunt this forum.

I develop and maintain a number of scripts (mostly Perl and ksh) which I have running both on out HP-UX platforms and Windows platforms.

Under Windows I use Windows Services for Unix (basically a rebadged MKS) which allows most of my scripts to run unmodified on both platforms.

The nature of these scripts is that they send out a communication when something that is not quite right is discovered. For email under Unix it is a snap, I usually just call mailx and away we go.

Windows for managing email is a whole different ball game.

Is there a straight forward way of sending an email from the command line on a Windows platform. A Perl module perhaps?
Behold the turtle for he makes not progress unless he pokes his head out.
6 REPLIES 6
Naveej.K.A
Honored Contributor

Re: mailx equivalent under MS OS's

Hi,

Perhaps something like telnetting to the SMTP server and then typing the text there.

telnet smtpserver 25 << EOF
ehlo localhost
mail from:username@company.com
rcpt to:mailaddress@mailaddress.com
data
Put the contents here
.
EOF

This will again depend upon the MTA settings on the SMTP server (but mostly works if its a unix smtp server).

Regards,
Naveej
practice makes a man perfect!!!
Joseph Loo
Honored Contributor

Re: mailx equivalent under MS OS's

hi,

i think there is a tool call blat which does this:

http://www.blat.net/

regards.
what you do not see does not mean you should not believe
Rainer von Bongartz
Honored Contributor

Re: mailx equivalent under MS OS's

The MKS toolkit contains a tool called smtpmail.exe.

Isn't there something alike in the SFU ??


Regards
Rainer

He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Alex Lavrov.
Honored Contributor

Re: mailx equivalent under MS OS's

I'm pretty sure that there is a mailx package in cygwin. Check it out here:

http://www.cygwin.com

alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
JLee_1
Advisor

Re: mailx equivalent under MS OS's

Dave,
I've used 'sendEmail' for porting perl apps to windows that needed a sendmail util. It works well. You'll need to install active perl to use it though. Here are the links.

SendEmail:
http://caspian.dotconf.net/menu/Software/SendEmail/

ActivePerl:
http://aspn.activestate.com/ASPN/Downloads/ActivePerl/

Good luck,
Jim
Phil.Howell
Honored Contributor

Re: mailx equivalent under MS OS's

I will second the use of blat
Phil