Next Previous Contents

7. Sending Mail

7.1. How do you use mail aliases with VM?

Date: June 20, 1998

VM uses Emacs' Mail mode to send mail. Mail mode's aliases work the same way Berkeley Mail aliases work. Put lines in .mailrc like this:

alias dave
alias jay
alias yuks dave jay

You can now send mail to "dave", "jay" or "yuks" and they will be expanded before being passed to the mail system. You can also use the mail-abbrevs package to expand the aliases before sending. See the Emacs/XEmacs documentation for more information.

If you find mail aliases too limiting, you may want to try the Insidious Big Brother Database (BBDB), an address book database with nifty auto-record-creation and name-completion features.

7.2. How do I add the Re: in front of replies?

Date: June 20, 1998
Updated: February 8, 1999

You can add just about anything in front of message replies by adding the following to your .vm file:

(setq vm-reply-subject-prefix "Re: ")

If you use something other than "Re: ", don't forget to do this as well, so that the various subject commands match both the original and the replies:

(setq vm-subject-ignored-prefix "^\\(re: *\\)+")

Here's a fancier version that handles prefixes like "Re[2]: " as well:

(setq vm-subject-ignored-prefix "^\\(re\\(\\[[0-9]+\\]\\)?: *\\)+")

And an even fancier one, from RMail via Michael Ernst:

(setq vm-subject-ignored-prefix "\\`\\(re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)+")

7.3. How can I BCC: myself on all outgoing messages?

Date: June 20, 1998

You can add the following to your .vm file:

(setq mail-self-blind t)

7.4. How do I FCC: myself on all outgoing messages?

Date: June 20, 1998
Updated: February 8, 1999

You can add the following to your .vm file:

(setq mail-archive-file-name (expand-file-name "~/mail/sent-items"))

Recent versions of VM automatically generate Message-ID: headers, so that mail that's FCC'd to your outgoing mail folder can be properly threaded.

7.5. Is there an easy way to get VM to include all recipients but me in the CC: field of a reply?

Date: June 20, 1998
Updated: November 3, 2005

The variable `vm-reply-ignored-addresses' is used to strip addresses from the list of recipients when replying to a message. For example:

(setq vm-reply-ignored-addresses '("^"
				   "[ \<]"))

Alternatively, if your email address is stored in the variable `user-mail-address' then this will work:

(setq vm-reply-ignored-addresses (list (concat "^" user-mail-address)
				       (concat "[ \<]" user-mail-address)))

7.6. Can I send mail to a POP server?

Date: June 20, 1998

Yes, but there's not much point in it unless the POP server also is an SMTP server. (Yes, some weird implementations of POP understand SMTP commands. That's not what most people are talking about.)

This question usually is asked by someone who's using VM to get mail from a POP server and isn't running a mail server on the local machine. In that situation, VM can't send mail normally (using the sendmail program). Check out smtpmail and, if you like, feedmail, which allow you to send mail to an SMTP server.

7.7. Can I use VM with smail/qmail/some other mailer?

Date: June 20, 1998
Updated: October 7, 2003

Yes. Either use smtpmail or change the value of the variable `sendmail-program' to point to the location of your mailer. (Your mailer must be able to accept sendmail-style arguments if you go that route.)

For example, for qmail comes with a sendmail replacement. If your sysadmin has not installed it as /usr/lib/sendmail, you can explictly use:

(setq sendmail-program "/var/qmail/bin/sendmail")

More information about using VM with qmail is available in section 4.5.

Next Previous Contents