smtpmail

send mail using SMTP

Command


SYNOPSIS

smtpmail [-f from-addr] [-h hostname] [-s subject] user ...


DESCRIPTION

The smtpmail command sends mail to a list of specified users using the Simple Mail Transport Protocol (SMTP). To use this command, you must have the TCP/IP service installed. You must also be actively connected using TCP/IP when issuing the smtpmail command because the command has no dialing capabilities and would otherwise be unable to connect to a host.

smtpmail reads the message to be sent from the standard input. The message is terminated by an EOF (CTRL-Z on console) or a line consisting of a single period (.).

Options

-f from-addr

specifies an Internet mail address that identifies the sender.

-h hostname

attempts to connect with the specified hostname. Without this option, smtpmail attempts to connect with the machine specified as the Domain host in the TCP/IP settings.

-s subject

includes a standard e-mail header with the message and specifies the subject text for that header. Without this option, smtpmail assumes that the message contains a properly formatted e-mail header and nothing is added.

If a header is added, it has the following fields:

Return-Path:

contains the address of the sender. This is the Internet address specified by the -f option. When no -f option is given, it is an address formed by combining the user name of the current user with the domain name.

Subject:

contains the specified subject text.

From:

contains the same address as the Return-Path: field.

Date:

contains the date and time that the smtpmail command was issued.

To:

contains the list of users to receive the message as specified on the command line.


EXAMPLES

You can use smtpmail as the mail delivery agent for mailx by adding the following line to your /etc/mailx.rc file:
set sendmail=c:/mks/mksnt/smtpmail.exe
Note that you must replace c:/mks/mksnt with the path to the smtpmail executable on your system.


DIAGNOSTICS

Possible exit status values are:
0

The message was successfully transmitted to the remote host. This does not mean that any of the specified users actually received the message, only that it was successfully sent on the first stage of its journey.

1

Failure due to any of the following:

— could not connect to the remote host
— the remote host rejected all of the supplied recipients
— the connection to the remote host was closed prematurely


SEE ALSO

Commands:
mailx


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]