The sendmail
program and the qmail-inject
program are convenient ways of sending mail from a program running on the same computer as the qmail server.
Of the two, qmail-inject
is the more basic one. Its simplest invocation, sending an email that is stored in a file named message
, can be done as follows:
qmail-inject <message
Part of the simplicity of this is that qmail-inject
expects the input file to be a correctly formatted email message, complete with correctly formatted headers. The headers may be used as a last resort to guess the envelope recipients (qmail-inject searches for To:, Cc:, Bcc:, Apparently-To:, Resent-To:, Resent-Cc:, and Resent-Bcc: headers, in that order) and the envelope sender (qmail-inject searches for Sender:, From:, Reply-To:, Return-Path:, Return-Receipt-To:, Errors-To:, Resent-Sender:, Resent-From:, and Resent-Reply-To: headers, in that order). However, it is better to specify the envelope information with the command...