mapimail

send mail on a Win32 system using the MSMapi32 ActiveX COM object 

Command


SYNOPSIS

mapimail [-q] [-R] [-s subject] [[-f file]|[-t text]] [-c Cc-recipient] [-b Bcc-recipient] [-a attachment] [-u username] [-p password] recipient ...


DESCRIPTION

The mapimail command uses the MSMapi32 ActiveX COM object to send mail to specified recipients. For this command to work, Windows Messaging must be installed on your system. For details on installing Windows Messaging, see your system documentation.

Options

-a attachment 

specifies an attachment to be included with the mail message. attachment is the path name of the attachment.

-b Bcc-recipient 

specifies that Bcc-recipient receives a blind carbon copy of the mail message. Bcc-recipient is an e-mail address and does not appear in the header of the mail message.

-c Cc-recipient 

specifies that Bcc-recipient receives a carbon copy of the mail message. Cc-recipient is an e-mail address and appears in the header of the mail message.

-f file 

sets the body of the message to the contents of the specified file. If neither this option nor the -t text option are specified, mapimail reads the body of the message from standard input.

-p password 

specifies the password to be used when opening a mapimail session.

-q 

quietly fails when necessary parameters are missing. Normally, GUI dialog boxes appear when necessary parameters are missing.

Note:

For the -q option to work correctly, the Inbox application must be running on the desktop, or you must have specified the [-u] and the [-p] options.

-R 

adds the Return-Receipt-Requested: header to the mail message.

-s subject 

specifies subject as the subject line for the mail message.

-t text 

sets the body of the message to text. If neither this option nor the -f file option are specified, mapimail reads the body of the message from standard input.

-u username 

specifies the username to be used when opening a mapimail session.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

>0 

An error occurred.


NOTES

This command is actually implemented as a MKS KornShell script with embedded perl code. MKS cannot be responsible for proper functionality of this code if you alter the mapimail.sh file in any way.

Unless you have properly configured your Windows Messaging software, mail sent via mapimail is spooled in your Inbox and is not sent until one selects Tools->Deliver Now from your Windows Messaging menu bar.

If your mail delivery agent is Microsoft Mail, mapimail can send mail to multiple recipients, Cc-recipients, and Bcc-recipients.

If your mail delivery agent is Internet Mail, mapimail can send mail to only one recipient, one Cc-recipient and one Bcc-recipient at this time.


PORTABILITY

Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
mailx, smtpmail


PTC MKS Toolkit 10.4 Documentation Build 39.