Next: , Previous: Mail Headers, Up: Variables

3.3 Mail Variables

message-send-mail-function
Function used to send the current buffer as mail. The default is message-send-mail-with-sendmail, or smtpmail-send-it according to the system. Other valid values include message-send-mail-with-mailclient, message-send-mail-with-mh, message-send-mail-with-qmail, message-smtpmail-send-it and feedmail-send-it.

The function message-send-mail-with-sendmail pipes your article to the sendmail binary for further queuing and sending. When your local system is not configured for sending mail using sendmail, and you have access to a remote SMTP server, you can set message-send-mail-function to smtpmail-send-it and make sure to setup the smtpmail package correctly. An example:

          (setq message-send-mail-function 'smtpmail-send-it
                smtpmail-default-smtp-server "YOUR SMTP HOST")

To the thing similar to this, there is message-smtpmail-send-it. It is useful if your ISP requires the POP-before-SMTP authentication. See POP before SMTP.

If you have a complex SMTP setup, and want some messages to go via one mail server, and other messages to go through another, you can use the ‘X-Message-SMTP-Method’ header. These are the supported values:

smtpmail
               X-Message-SMTP-Method: smtp smtp.fsf.org 587

This will send the message via ‘smtp.fsf.org’, using port 587.

               X-Message-SMTP-Method: smtp smtp.fsf.org 587 other-user

This is the same as the above, but uses ‘other-user’ as the user name when authenticating. This is handy if you have several SMTP accounts on the same server.

sendmail
               X-Message-SMTP-Method: sendmail

This will send the message via the locally installed sendmail/exim/etc installation.


message-mh-deletable-headers
Most versions of MH doesn't like being fed messages that contain the headers in this variable. If this variable is non-nil (which is the default), these headers will be removed before mailing when sending messages via MH. Set it to nil if your MH can handle these headers.
message-qmail-inject-program
Location of the qmail-inject program.
message-qmail-inject-args
Arguments passed to qmail-inject programs. This should be a list of strings, one string for each argument. It may also be a function.

E.g., if you wish to set the envelope sender address so that bounces go to the right place or to deal with listserv's usage of that address, you might set this variable to '("-f" "you@some.where").

message-sendmail-f-is-evil
Non-nil means don't add ‘-f username’ to the sendmail command line. Doing so would be even more evil than leaving it out.
message-sendmail-envelope-from
When message-sendmail-f-is-evil is nil, this specifies the address to use in the SMTP envelope. If it is nil, use user-mail-address. If it is the symbol header, use the ‘From’ header of the message.
message-mailer-swallows-blank-line
Set this to non-nil if the system's mailer runs the header and body together. (This problem exists on SunOS 4 when sendmail is run in remote mode.) The value should be an expression to test whether the problem will actually occur.
message-send-mail-partially-limit
The limitation of messages sent as message/partial. The lower bound of message size in characters, beyond which the message should be sent in several parts. If it is nil (which is the default), the size is unlimited.