Go to the first, previous, next, last section, table of contents.

Mail Sending Interfaces

When sending mail, the keystroke M-TAB is bound to the function bbdb-complete-name. This will take the string that you have typed (from point back to the preceeding colon, comma, or the beginning of the line) and will complete that against the contents of the database. What you have typed may be an initial subsequence of a person's full name or network address; if it completes ambiguously, then what you have typed will be replaced with the common portion of the matches. Typing M-TAB again will show a list of possible completions. If it completes unambiguously, then an address of the form "User Name <email-address>" will be inserted. The variable bbdb-completion-type controls whether completion is done on real names, or network addresses, or both.

If `sendmail.el' is not loaded before BBDB, then M-TAB will not be automatically bound; if you find that it isn't, then do this:

(setq mail-setup-hook
      '(lambda ()
	 (define-key mail-mode-map "\M-\t" 'bbdb-complete-name)))

If you are using my `mail-abbrevs.el' package, which uses the word-abbrev mechanism for mail aliases, then you can use the macro bbdb-build-mail-abbrevs-table to define your mail aliases. Arguments are of the form (("abbrev" "full name") ... ).

For each of the arguments, a word-abbrev for abbrev will be defined which expands into the full-name and network address of the specified user. This lets you use the BBDB as your central repository of network addresses, instead of having to update your `.mailrc' file as well. Here is an example of use:

(bbdb-build-mail-abbrevs-table
  ("sandy"	"Sandy Wisch")
  ("ivan"	"Ivan Vazquez")
  ("jim"	"Jim Muller")
  )

Assuming that there are BBDB entries for the above-mentioned people, the following abbreviations will be defined:

sandy
Sandy Wisch <wisch@cory.berkeley.edu>
ivan
Ivan Vazquez <ivan@mbcrr.harvard.edu>
jim
Jim Muller <muller@vague.sarnoff.com>

Go to the first, previous, next, last section, table of contents.