MAPISEND.exe (Microsoft Back Office 4.5 Resource kit)

Send email from the command line.

This utility no longer works with the latest versions of Outlook, use PowerShell or a 3rd party alternative like BLAT instead.

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 the default address book.

Mapisend requires MAPI - i.e the MS Outlook client needs to be installed.

MAPI cannot be used to generate HTML-formatted messages. As an alternative, consider using the Microsoft Outlook Object Model, CDONTS, CDOSYS, CDOEX, or a third-party SMTP control.

Examples

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

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

“The new electronic interdependence re-creates the world in the image of a global village” ~ Marshall McLuhan

Related commands

Equivalent PowerShell: New-Object Net.Mail.MailMessage - Send email via SMTP.
BLAT (freeware) - Send email via SMTP, avoids the need to install MS Outlook.
A command like START mailto:shameika@example.com will send email but requires the user to press send.
Equivalent bash command (Linux): sendmail.


 
Copyright © 1999-2024 SS64.com
Some rights reserved