smtpmailsend mail using SMTP |
Command |
smtpmail
[-f
from-addr]
[-h
hostname]
[-s
subject]
user ...
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 (.
).
-f
from-addrspecifies an Internet mail address that identifies the sender.
-h
hostnameattempts 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
subjectincludes 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.
smtpmail
as the mail delivery agent for
mailx
by adding the following line
to your /etc/mailx.rc
file:
Note that you must replaceset sendmail=c:/mks/mksnt/smtpmail.exe
c:/mks/mksnt
with the path to
the smtpmail
executable on your system.
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:
mailx