At Summary mode, pressing w and the like creates a new draft buffer. You can edit and send mail and news articles in this buffer.
Basically it is Emacs-standard mail mode.
Initially, the cursor is at the `To:' field. Fill in recipients addresses. TAB completes them.
If you want to submit a news article, add `Newsgroups:' field by yourself. Field names can be completed by TAB.
If you save the draft buffer you are editing, it is appended to the
folder specified by wl-draft-folder
.
Using `FCC:' field, you can specify the folder to which a copy of the message is saved when it is sent.
Multi-part editing utilize MIME edit mode of SEMI. For procedures of editing, refer to respective documents. See section `MIME-Edit' in a MIME user interface for GNU Emacs. You can also see help by C-c C-x ? in draft buffer.
You can set wl-draft-config-alist
so that header and body of the
message will automatically modified depending on information of header
and others.
The initial setting of wl-draft-config-alist
is nil
.
In the example below, the header is modified when
wl-draft-send-and-exit
or wl-draft-send
is invoked. You
can set wl-interactive-send
to non-nil so as to confirm changes
before sending the message.
(setq wl-draft-config-alist '(((string-match "aaa\\.example\\.com$" (system-name)) ;; applied if the expression is non-nil (wl-smtp-posting-server . "mailserver-B") (wl-nntp-posting-server . "newsserver-B") ;; settings of temporary variables ) ("^To: .*user@aaa\\.bbb\\.example\\.com" ;; applied if it matches the header of the draft buffer ("Organization" . (format "Go %s" my-webpage))) ;; you can write elisp expressions here (eval only) (top . "Hello.\n") ;; inserted at the top of the body (bottom . "\nBye.\n") ;; inserted at the bottom of the body ))
The format of wl-draft-config-alist
is:
'(("regexp of the header" or elisp expression ("Field" . value(elisp expression)) (variable . value(elisp expression)) (sub-function . value(elisp expression)) function ...) ("regexp of the header" or elisp expression ("Field" . value(elisp expression)) ...))
Per default, there are 10 following sub-functions.
'header: Inserts the specified string at the bottom of the header.
'header-top: Inserts the specified string at the top of the header.
'header-file: Inserts the specified file at the bottom of the header.
'x-face: Inserts `X-Face:' field with the content of the specified file.
'top: Inserts the specified string at the top of the body.
'top-file: Inserts the specified file at the top of the body.
'body: Replaces the body with the specified string.
Specifying nil
deletes the entire body string.
'body-file: Replaces the body with the content of the specified file.
'bottom: Inserts the specified string at the bottom of the body.
'bottom-file: Inserts the specified file at the top of the body.
'part-top: Inserts the specified string at the top of the current part.
'part-bottom: Inserts the specified string at the bottom of the current part.
'template: Applies the specified template.
(refer to the next subsection)
These are defined in wl-draft-config-sub-func-alist
and you can
change them or add your own functions. If you read the code, you can
easily find how to write the functions.
At the first of each item, a regular expression of the header or an elisp expression should be specified. In the case of an elisp expression, the item is applied when the expression is evaluated non-nil.
Per default, when multiple items match or are evaluated non-nil, all
such items are applied, but if you set a variable
wl-draft-config-matchone
to t
, only the first matching one
is applied.
At the second of the item, a cons or a list of functions should be specified. The car part of the cons should be a header field, a variable, or a sub-function. When a header field is specified, the field will be modified. If a variable is specified, the value of the variable will be modified temporarily.
In the cdr part of a cons, not only a variable but also an elisp
expression can be specified as is. If the car part is a header field
and the cdr part is nil
, the field will be deleted.
If you want to use name of parent folder, you can refer the buffer local
variable wl-draft-parent-folder
.
See the next example as well:
(setq wl-draft-config-alist '((reply ;; (1) "X-ML-Name: \\(Wanderlust\\|emacs-mime-ja\\|apel-ja\\)" ;; applied if it matches the header of the buffer being replied (body . " Hello.\n") (template . "default") )))
As in the (1) above, if a header regexp is prepended with reply
,
it is applied when the draft is prepared by wl-summary-reply
for
example, and when it matches the header being replied. It is ignored
when there is no buffer being replied, like after wl-draft
was
invoked.
Note that wl-draft-config-alist
is applied only once when
wl-draft-send-and-exit
or wl-draft-send
is invoked.
Therefore, if you want to apply wl-draft-config-alist
again after
aborting transmission, execute C-c C-e
(wl-draft-config-exec
) explicitly.
If you don't want to apply wl-draft-config-alist
when
wl-draft-send-and-exit
or wl-draft-send
is invoked,
do the following:
(remove-hook 'wl-draft-send-hook 'wl-draft-config-exec)
If you want to apply wl-draft-config-alist
when a draft buffer is
prepared, do the following:
(add-hook 'wl-mail-setup-hook 'wl-draft-config-exec)
If you want to apply wl-draft-config-alist
when you re-edit a mail
from summary mode by typing E(wl-summary-reedit
), do the
following:
(add-hook 'wl-draft-reedit-hook 'wl-draft-config-exec)
Set a variable wl-template-alist
, and type C-c C-j or
M-x wl-template-select in the draft buffer.
The format of wl-template-alist
is almost the same as
wl-draft-config-alist
.
(setq wl-template-alist '(("default" ("From" . wl-from) ("Organization" . "~/.wl sample") (body . "Hello.\n")) ("report" (template . "default") ;; (a) ("To" . "boss@example.com") ("Subject" . "Report") (body-file . "~/work/report.txt") ) ))
As you can see, the only difference is item (template) names such as
`default' and `report', instead of a regexp of header.
Because definition of each item is the same as
wl-draft-config-alist
, you can call another template, like (a).
Executing the command wl-template-select
results in template
selection, but the result differs depending on variable
wl-template-visible-select
.
If wl-template-visible-select
is t
(default), a buffer
window is shown below the draft buffer. You can select a template by
n and p seeing the buffer window.
Press the RET key and the template is actually applied to the draft
buffer. If you press q, nothing is applied. In addition, you can
adjust the window size by wl-template-buffer-lines
.
If wl-template-visible-select
is nil
, you should type the
name of the template in the mini buffer.
As shown in the example in wl-draft-config-alist
, you can select
`default' template by writing:
(template . "default")
You can send mail by POP-before-SMTP with this single line:
(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
Configure the following variables if you need.
wl-pop-before-smtp-user
elmo-pop3-default-user
is used.
wl-pop-before-smtp-server
elmo-pop3-default-server
is used.
wl-pop-before-smtp-authenticate-type
elmo-pop3-default-authenticate-type
is used.
wl-pop-before-smtp-port
elmo-pop3-default-port
is used.
wl-pop-before-smtp-stream-type
starttls
, STARTTLS (RFC2595) connection will be established. If
unset, elmo-pop3-default-stream-type
is used.
If variables for POP-before-SMTP (wl-pop-before-smtp-*
) are
unset, settings for POP folders (elmo-pop3-default-*
) are
used.
Therefore, if SMTP server and POP server are actually the same, and if
POP folder per default (such as `&') is available, no settings are
required.
Refer to the following URL about POP-before-SMTP.
http://spam.ayamura.org/tools/smPbS.html http://www.iecc.com/pop-before-smtp.html
wl-draft-yank-original
)
wl-draft-preview-message
)
wl-draft-send
)
wl-draft-send-and-exit
)
wl-draft-save
)
wl-draft-kill
)
wl-draft-mimic-kill-buffer
)
wl-summary-reedit
) in
the `+draft' folder.
(wl-draft-save-and-exit
)
wl-caesar-region
)
wl-draft-highlight-and-recenter
)
wl-toggle-plugged
)
wl-jump-to-draft-buffer
)
wl-draft-config-alist
.
(wl-draft-config-exec
)
wl-template-select
)
wl-addrmgr
)
wl-draft-elide-region
).
The text is killed and replaced with the contents of the variable
wl-draft-elide-ellipsis
. The default value is to use an ellipsis
(`[...]').
wl-subscribed-mailing-list
nil
. Mailing lists to which you
subscribe. If any of these are contained in `To:' or `Cc:'
field of a reply draft, removes your own address from
`Mail-Followup-To:' and `Cc:'. And if any of these are
contained in `To:' or `Cc:' field of a message to be
automatically re-filed, the destination folder will be leaned in
connection with the address.
Example:
(setq wl-subscribed-mailing-list '("wl@lists.airs.net" "apel-ja@m17n.org" "emacs-mime-ja@m17n.org"))
wl-insert-mail-followup-to
nil
. If non-nil, `Mail-Followup-To:'
field is automatically inserted in the draft buffer.
wl-insert-mail-reply-to
nil
. If non-nil, `Mail-Reply-To:'
field is automatically inserted in the draft buffer.
wl-auto-insert-x-face
t
. If non-nil and there is an encoded
X-Face string in a file `~/.xface' (the value of the variable
wl-x-face-file
), inserts it as an `X-Face:' field in the
draft buffer. If nil
, it is not automatically inserted.
wl-insert-message-id
t
. If non-nil, `Message-ID:' field
is automatically inserted on the transmission.
wl-local-domain
nil
. If nil
, the return value of
the function system-name
will be used as the domain part of
`Message-ID:'.
If system-name
does not return FQDN (i.e. the full name of the
host, like `smtp.gohome.org'), you must set this variable
to the string of the local domain name without hostname (like
`gohome.org'). That is, a concatenation of system-name
`.' wl-local-domain
is used as domain part of the
`Message-ID:'.
If your terminal does not have global IP, set the value of
wl-message-id-domain
. (You might be beaten up on the Net News if
you use invalid `Message-ID:'.)
Moreover, concatenation of system-name
`.'
wl-local-domain
will be used as an argument to the HELO command
in SMTP.
wl-message-id-domain
nil
. If non-nil, this value is used as a
domain part of the `Message-ID:'. If your terminal does not have
global IP address, set unique string to this value (e.x. your e-mail
address).
wl-message-id-domain
nil
. If nil
, the return value of
the function system-name
will be used as the domain part of
`Message-ID:'. If system-name
does not return FQDN
(i.e. the full name of the host, like `smtp.gohome.org'), you
must set this variable to the string of the full name of the
host. Otherwise, you might be beaten up on the Net News.
wl-draft-config-alist
nil
. Modifies the draft message just
before the transmission. The content of wl-draft-config-alist
will be automatically applied only once on the transmission. If you
want to apply it manually, use C-c C-e. This command can be used
many times.
wl-template-alist
nil
.
This variable specifies the template to be applied in the draft buffer.
wl-draft-config-matchone
nil
. If non-nil, only the first matching
item is used when wl-draft-config-alist
is applied. If
nil
, all matching items are used.
wl-template-visible-select
t
.
If non-nil, you can preview the result of the template selection in
another window.
wl-template-confirm
nil
.
If non-nil, asks for confirmation when you press the enter key to select
template while previewing.
wl-template-buffer-lines
wl-template-visible-select
is non-nil, this variable specifies
the size of the preview window.
wl-draft-reply-buffer-style
split
. split
or full
can be
specified. In the case of full
, the whole frame will be used for
a reply draft buffer when it is prepared.
wl-draft-use-frame
nil
.
If non-nil, use new frame for the draft.
wl-draft-truncate-lines
default-truncate-lines
.
If it is non-nil, truncate long lines in draft buffer.
wl-from
user-mail-address
. The value of this variable is inserted as a
`From:' field of the draft when it is prepared.
wl-envelope-from
nil
.
The value of this variable is used for envelope from (MAIL FROM).
If nil
, the address part of wl-from
is used.
wl-user-mail-address-list
nil
.
This is the User's address list. If you have multiple addresses,
set this variable.
wl-fcc
nil
.
If non-nil, the value of this variable is inserted as a `Fcc:' of
the draft when it is prepared. If function is specified, its return
value is used.
wl-bcc
nil
.
If non-nil, the value of this variable is inserted as a `Bcc:' of
the draft when it is prepared.
wl-reply-subject-prefix
wl-draft-reply-use-address-with-full-name
t
.
If non-nil, insert her full name with address when prepare a draft for
reply a message. If it is nil
, insert her address only.
wl-draft-enable-queuing
t
.
This flag controls off-line transmission. If non-nil, the draft is
sent off-line.
wl-draft-use-cache
nil
. If the value is non-nil and
wl-insert-message-id
is nil, cache the message which is sent.
wl-fcc-force-as-read
nil
. If the value is non-nil,
Mark as read the message saved by `Fcc:' (only for IMAP folders).
wl-auto-flush-queue
y-or-n-p
). If you want to transmit it
manually, press F in the folder mode.
wl-ignored-forwarded-headers
wl-ignored-resent-headers
wl-draft-always-delete-myself
wl-draft-delete-myself-from-bcc-fcc
wl-subscribed-mailing-list
are contained in `To:'
or `Cc:' field, do not insert `Bcc:' or `FCC:' field.
wl-smtp-posting-server
nil
.
This is the SMTP server name for mail transmission.
wl-smtp-posting-user
nil
.
This is the user name for SMTP AUTH authentication. If nil
,
smtp-authenticate-user
is used.
wl-smtp-authenticate-type
nil
.
This is the authentication method for SMTP AUTH authentication. If
nil
, smtp-authenticate-type
is used. If
smtp-authenticate-type
is still nil
, authentication will
not be carried out.
wl-smtp-connection-type
nil
.
This variable specifies how to establish SMTP connections.
If nil
, smtp-connection-type
is used.
If it is starttls
, STARTTLS (RFC2595) is used.
wl-nntp-posting-server
nil
.
This is the NNTP server name used for news submission.
If nil
, elmo-nntp-default-server
is used.
wl-nntp-posting-user
nil
.
This is the user name for AUTHINFO authentication on news submission.
If nil
, elmo-nntp-default-user
is used.
If it is still nil
, AUTHINFO authentication will not be carried out.
wl-nntp-posting-port
nil
.
This is the port number of the NNTP server used for news submission.
If nil
, elmo-nntp-default-server
is used.
wl-nntp-posting-stream-type
nil
.
If nil
, elmo-nntp-default-stream-type
is evaluated. If non-nil,
SSL is used for news submission. If starttls
, STARTTLS (RFC2595)
connection will be established.
wl-pop-before-smtp-user
nil
.
This is the POP user name for POP-before-SMTP.
If it is nil
, elmo-pop3-default-user
is used.
wl-pop-before-smtp-server
nil
.
This is the POP server name for POP-before-SMTP.
If it is nil
, elmo-pop3-default-server
is used.
wl-pop-before-smtp-authenticate-type
nil
.
This is the authentication method for POP-before-SMTP authentication.
If it is nil
, elmo-pop3-default-authenticate
is used.
wl-pop-before-smtp-port
nil
.
This is the POP port number for POP-before-SMTP. If it is nil
,
elmo-pop3-default-port
is used.
wl-pop-before-smtp-stream-type
nil
.
This flag controls the use of SSL for POP-before-SMTP. If it is
nil
, elmo-pop3-default-stream-type
is used. If starttls
,
STARTTLS (RFC2595) connection will be established.
wl-draft-queue-save-variables
wl-draft-sendlog
t
.
If t
, transmission log is written in `~/.elmo/sendlog'. It
is written when:
wl-draft-sendlog-max-size
wl-draft-sendlog
is t
, the log is rotated when it grows
beyond the size specified by this variable.
wl-use-ldap
nil
.
If non-nil, address completion uses LDAP.
wl-ldap-server
wl-ldap-port
nil
.
If non-nil, the value is used as port number.
wl-ldap-base
wl-draft-remove-group-list-contents
t
.
If non-nil, remove the group-lists' members in the recipients when
sending the message (group-list means the description such as
`Group: foo@gohome.org, bar@gohome.org;' in the recipients).
Go to the first, previous, next, last section, table of contents.