Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email from the command line in Windows 2000

Status
Not open for further replies.

bhogaj31

IS-IT--Management
Mar 11, 2003
114
0
0
GB
Hi,

Is there any application available which allows a user to send emails from a command line on Windows 2000.

Something like "Sendmail" on a unix machine.

Preferably free and ready to use.


Any help much appreciated.
 
bhogaj31,

If you have the Back Office/Resource Kit, you can use the "MAPISEND" command from the windows 2000 command prompt. This requires that an email client (Outlook etc..) be installed on the system the command is being run from.

Take a look at the command syntax options.

syntax
MAPISEND -u "<profile>" -p <password>
-r <recipient> -s "<subject>" -m <text message> [options]


MAPISEND -u "<profile>" -p <password>
-r <recipient> -s "<subject>" -t <text_file> [options]

options
-i interactive login (prompts for profile and password)
-c cc: list
-f File Attachment - path and file name(s)
-v generates verbose output (an 8 line summary of the message)

"profile" is the profile name (user mailbox) of sender
"subject" is the subject line
"recipient" is one or more recipient(s)
If more than one recipient - separate with ';' these must not be ambiguous in default address book

Examples

mapisend -u "MS Exchange Settings" -p MyPassword -r billg@sun.com -s "Subject" -m "Test message text"

mapisend -u "MS Exchange Settings" -p MyPassword -r billg@hp.com -s "Subject" -t c:\MyMail.txt >> c:\mail.log


A substitue for MAPI is BLAT or Postie
 
I have a perl script I could post if you like but it would require perl to be installed on any machine that would need to send the email.
 
Hi everyone

Thank you for all the responses.

I found that Blat was the closest thing to what I required.

It is the easiest to use.

Many thanks to TonyGroves for this info.


Regards

Bhogaj31
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top