[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3 Composing messages

This section explains how to compose a message.

Methods to enter Draft mode to write a new message are given below.

  1. Type ‘M-x mew-send’.
  2. Type ‘C-xm’ if ‘mail-user-agent’ is configured.
  3. Press ‘w’ in Summary mode.

Then a buffer like the following is prepared.

To: 
Subject:
From: Kazu Yamamoto <kazu@example.org> 
X-Mailer: Mew version 6.5 on Emacs 22.3
----

We call this "Draft mode". In Draft mode, we call the region above "—-" the header, and the region below "—-" the body.

Also, replying a message (‘a’ or ‘A’) and/or forwarding messages (‘f’ or ‘F’) lead you to Draft mode from Summary mode.

Drafts are temporarily stored in the +draft folder. You can write multiple messages simultaneously.

For the method of deleting a prepared draft, please refer to Give me a break.

Now let’s see how to use Draft mode.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Completions in a header

In the header, completions for each field are assigned to ‘TAB’ as follows:

<Field completion>

If the cursor is at the beginning of a line and the previous line does not end with ",", you can complete field defined in the ‘mew-fields’ variable with ‘TAB’.

To: kazu@example.org
R‘TAB

At the point above, if you type ‘TAB’, you get:

To: kazu@example.org
Reply-To: 

<Folder completion>

At a point, such as Fcc:, you can complete folder name with ‘TAB’. For example:

Fcc: ‘TAB

Here, "+" is completed.

Fcc: +‘TAB

One more type of ‘TAB’ shows candidates. Please type in the appropriate characters then type ‘TAB’.

Fcc: +b‘TAB

If a single candidate can be determined, you get a completion.

Fcc: +backup

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Circular completions in a header

In a header, circular completions are assigned to ‘C-cTAB’. Circular completion means that a value of a list is replaced by the next value of the list. The end of the list is considered continuous to the top of the list. Circular completions in a header are different for each field as follows:

<Circular completion of domain name>

On a field where addresses are written, use ‘C-cTAB’ for domain completion. Candidates are selected from ‘mew-mail-domain-list’.

To: kazu@‘C-cTAB

If you try to complete just after "@" as up above, the first domain of ‘mew-mail-domain-list’ is inserted.

To: kazu@example.org‘C-cTAB

After completion, pressing ‘C-cTAB’ one more times inserts the next domain of ‘mew-mail-domain-list’. This completion is looped.

To: kazu@example.jp

If a single candidate can be determined, it is inserted.

To: kazu@w‘C-cTAB

The above example gives:

To: kazu@example.jp

<Circular completion of From:>

In Draft mode, the From: field is inserted with the format of "mew-name <mew-user@mew-domain>".

From: Kazu Yamamoto <kazu@example.org>

On the From: field, ‘C-cTAB’ circularly completes its value from ‘mew-from-list’. You can set ‘mew-from-list’ by yourself. Also, ‘mew-from-list’ can be set automatically. For automatic setup, please refer to Changing receiving/sending behavior.

Typing ‘C-cTAB’ anywhere on the value replaces the value with the next value of ‘mew-from-list’. For example,

From: Kazu Yamamoto <kazu@example.org>‘C-cTAB

becomes as follows:

From: Kazuhiko Yamamoto <kazu@example.jp>

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 Address Completion

You can complete addresses on To: or Cc:. This completion command is bound to ‘TAB’.

To: kazu‘TAB

When you type ‘TAB’ after a part of an address as the example above, the entire address is completed as follows:

To: kazu@example.org

There are three kinds of registered addresses to be used for the completion.

  1. The expansion rule in an address book
  2. The personal information in the address book
  3. Learned addresses when sending

Mew provides two ways to complete addresses. You can select one of them with ‘mew-use-full-alias’, which is default to ‘nil’.

If ‘mew-use-full-alias’ is ‘nil’, the portion before ‘@’, a user name or a short name, is a target of the completion. When you type ‘TAB’, the user name is completed. And if the user name is uniquely completed and you type ‘TAB’ again, it is expanded to its entire address. Let’s call this Address Completion(1).

An advantage of Address Completion(1) (see section Address Completion(1)) is that you can use the completion/expansion against the three kinds of addresses seamlessly. You can also explicitly expand the user name with ‘TAB’ as described later. A disadvantage is that user names must be unique. So, if a user name is already registered, other addresses with the same user name cannot be learned.

If ‘mew-use-full-alias’ is ‘t’, for learned addresses when sending, completion target is an entire address. Let’s call this Address Completion(2).

An advantage of Address Completion(2) (see section Address Completion(1)) is that Mew can learn addresses whose user names are the same. One of disadvantages is that only the first address of personal information can be used (the other addresses are useless). And for the explicit expansion, you have to type ‘M-C-e’, a different key from ‘TAB’.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 Address Book

Mew provides an address book ("~/Mail/Addrbook). The address book has 2 formats. One specifies expansion rules, while the other defines personal information.

First, let’s look at the format that specifies expansion rules.

<shortname>: <address1>[, <address2>, <address3>,...]

In this way, you should specify a short name and a full address separated by ‘:’. If you want to expand the short name to multiple addresses, you can delimit them with a comma ‘,’. (This is exactly same as addresses delimited by ‘,’ in the To: field, for instance.) A space SPC is allowed after the comma ‘,’. For example:

pooh:           winnie-the-pooh@example.net
piglet:         piglet@example.org
friends:        pooh, piglet

Next, the format to define personal information is shown below:

<shortname> <address1>[, <address2>, <address3>,...] <nickname> <fullname>

In this way, four elements are separated by SPC. <shortname> is a short name. <nickname> and <fullname> are the person’s nickname and full name, respectively. (For proper usage of the nickname, please refer to Summary mode and/or Draft mode.)

The second element is the addresses. If the person has multiple addresses, delimit them using ‘,’. SPC is allowed after ‘,’, which means that it does not function as the delimiter. SPC surrounded by quotes ‘"’ also has no delimiting function here. For example:

kazu    kazu@example.org, kazu@example.net    Kazu-kun  "Kazuhiko Yamamoto"

In the personal information format, you can omit any element. When you want to omit an intermediate element, specify ‘*’. The following is an example to define nicknames for addresses.

*       kazu@example.org, kazu@example.net    Kazu-kun

The nickname is used to replace addresses in Summary mode and to replace the citation prefix (see section Signature and citation) in Draft mode.

The comment letters are ‘;’ and ‘#’. ‘;’ is valid only when it appears at the beginning of lines, resulting in the disregarding of the entire line. The comment marker ‘#’ is valid everywhere. The strings between ‘#’ and the end of the line are ignored. Also, ‘\’ means a continuous line.

Summary mode includes the feature of directly registering the information of the current message into Addrbook. To register a expansion rule, type ‘C-cC-a’.

#If you want to register this entry, type 'C-c C-c'.
#If you want to NOT register this entry, type 'C-c C-q'.
Shortname: kazu
Addresses: kazu@example.org
Comments: 

To register personal information, type ‘C-uC-cC-a’.

#If you want to register this entry, type C-c C-c.
#If you want to NOT register this entry, type C-c C-q.
Shortname: kazu
Addresses: kazu@example.org
Nickname: 
Name: Kazuhiko Yamamoto
Comments: 

Add or modify the information if necessary. To register this information, type ‘C-cC-c’. To quit the registration, type ‘C-cC-q’. You should also refer to Give me a break.

If you want to use characters of multiple languages, put the following onto the beginning of Addrbook.

#-*-coding:ctext;-*-

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.5 Learning addresses

When you send a message, addresses on the To: and Cc: field are automatically registered. Consider the following:

To: kazu@example.org

In the case of Address Completion(1) (see section Address Completion(1)): When this message is sent, a short name "kazu" is automatically registered for the address "kazu@example.org". If there is already a short name of "kazu", the next action is decided according to ‘mew-addrbook-override-by-newone’. If ‘nil’, the old entry remains. Otherwise, the new entry overrides the old one. When expanded, the address book short name has priority over the automatic short name. Only automatic short names which are not contained in the address book are valid.

In the case of Address Completion(1) (see section Address Completion(2)): When this message is sent, the address "kazu@example.org" is automatically registered.

The limit number of automatic short names is 2000 (‘mew-lisp-max-length’). Once the number exceeds 2000, the tail entries in the alphabetical order are removed. This information is automatically saved to the file "~/Mail/.mew-alias".

The automatic registration would register unnecessary short names. If you want to remove these entry, take the following steps. First, type ‘M-a’ to open "~/Mail/.mew-alias". Then edit it as you do against a text file. Lastly, type ‘C-xC-s’ to save it. When saving it, the modifications are automatically reflected to Mew.

The formats of Address Completion (1) and (2) are different. When you change the value of ‘mew-use-full-alias’ to switch one to the other, type ‘Z’ once in Summary mode. This converts the format properly.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6 Address Completion(1)

As far as Address Completion (2) is concerned, there is an assumption: user names or short names of expansion rules, personal information and learned addresses are unique.

For example, consider the following configuration of expansion rules:

pooh:           winnie-the-pooh@example.net

When you are in a header in Draft mode, working within an address field, after typing one or more characters, you can complete a short name for an address by pressing the ‘TAB’ key.

To: piglet@example.org, 
        po‘TAB

If you press the ‘TAB’ key, "pooh" is completed (unless other candidates exist).

To: piglet@example.org, 
        pooh‘TAB

One more press of the ‘TAB’ key expands the name to "winnie-the-pooh@example.net".

To: piglet@example.org, 
        winnie-the-pooh@example.net

A string ending with "@" is explicitly expanded. Please pay attention to the following case where similar short names are defined.

pooh:           winnie-the-pooh@example.net
pooh-pooh:      pooh-pooh@example.org

It is obvious that "pooh-" is completed to "pooh-pooh". But if you input "pooh", Mew cannot tell whether it should be expanded or completed to "pooh-pooh". Thus, if you want to explicitly complete "pooh" to "winnie-the-pooh@example.net", insert ‘@’ and type ‘TAB’.

To: pooh@‘TAB

Explicit expansion can be accomplished by ‘M-C-e’ instead of insertion of ‘@’.

The explanation above can be applied to learned addresses when sending.

The format of personal information means that each subsequently generated address will replace the former one. For example:

kazu    kazu@example.org, kazu@example.net    Kazu-kun  "Kazuhiko Yamamoto"

Let’s watch how it will be converted:

To: kazu‘TAB

Typing ‘TAB’ after "kazu" generates "kazu@example.org".

To: kazu@example.org‘TAB

Typing ‘TAB’ after "kazu@example.org" brings about "kazu@example.net".

To: kazu@example.net‘TAB

Then "kazu@example.org" will appear again if you type ‘TAB’ after "kazu@example.net". In this way, each address is replaced one by one.

After deciding an address, you can add its full name.

To: kazu@example.org‘M-TAB

Like this, typing ‘M-TAB’ replace the address with the following format.

To: Kazuhiko Yamamoto <kazu@example.org>

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.7 Address Completion(2)

As far as Address Completion(2) is concerned, for learned addresses when sending, the entire addresses are completion targets. For expansion rules in the address book, short names are completion targets and unique short names are expanded to corresponding addresses. For personal information in the address book, short names are completion targets and unique short names are expanded to their first addresses.

When you are in a header in Draft mode, working within an address field, after typing one or more characters, you can complete a short name or a learned address by pressing the ‘TAB’ key.

Suppose that kazu@example.org is already learned.

To: ka‘TAB

When you type some characters and press ‘TAB’, its address is completed:

To: kazu@example.org

Also suppose that "kazunori@example.jp" is learned. To expand a user name to "kazu@example.org", you should input "kazu@". To convert it to "kazunori@example.jp", you need to input "kazun".

For expansion rules and personal information, ‘TAB’ completes short names first. You can expand a unique short name to corresponding address with ‘TAB’.

For example, consider the following configuration of expansion rules:

pooh:           winnie-the-pooh@example.net

Let’s complete "pooh":

To: po‘TAB

If you press the ‘TAB’ key, "pooh" is completed (unless other candidates exist).

To: pooh‘TAB

One more press of the ‘TAB’ key expands the name to "winnie-the-pooh@example.net".

To: winnie-the-pooh@example.net

A problem occurs when a short name is not unique. Consider the following example:

pooh:           winnie-the-pooh@example.net
pooh-pooh:      pooh-pooh@example.org

It is obvious that "pooh-" is completed to "pooh-pooh". But if you input "pooh", Mew cannot tell whether it should be expanded or completed to "pooh-pooh". Thus, if you want to explicitly complete "pooh" to "winnie-the-pooh@example.net", type ‘M-C-e’. (There is no way to accomplish this with ‘TAB’.)

To: pooh‘M-C-e

This example is explicitly expanded as follows:

To: winnie-the-pooh@example.net

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.8 Sending a message

When you are ready to send a message after completing composition, choose one of the following two commands.

C-cC-m

Compose a message, put it into +queue or +postq, and leave it for later sending.

C-cC-c

Compose a message and send it. You receive the prompt: "Really send this message? (y or n) ". Type ‘y’ to send it.

Let’s look at how a message is modified when sent. Please see the following example:

To: pooh
Subject: the next Sunday
From: Piglet <piglet@example.org>
X-Mailer: Mew version 6.5 on Emacs 22.3
----
Would you like to play with me next Sunday?

// Piglet

This message is modified as follows, for example, if it is put into +queue or +postq by ‘C-cC-m’.

Date: Mon, 13 Mar 2000 19:49:50 +0900 (JST)
Message-Id: <20000313.194950.59499544.piglet@example.org>
To: winnie-the-pooh@example.net
Subject: the next Sunday
From: Piglet <piglet@example.org>
X-Mailer: Mew version 6.5 on Emacs 22.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Would you like to play with me in the next Sunday?

// Piglet

As you can see, Data: and Message-Id: are added. You should note that both its data type and its character set are guessed correctly and added.

When composing a message using ‘C-cC-m’ and ‘C-cC-c’, you can make use of a feature that identifies errors in a header.

Suppose you set ‘mew-ask-subject’ to ‘t’. If Subject: is empty, Mew asks you its value. If you want to leave it empty, just type ‘RET’. The default value of this variable is ‘nil’.

Suppose you set ‘mew-ask-fcc’ to ‘t’. If there is a folder that doesn’t exist, Mew asks you whether or not you want to create it. If you want to create it, type ‘y’. Otherwise, type ‘n’. If you type ‘n’, sending is aborted and the cursor returns to the draft. The default value of this variable is ‘nil’.

Mew asks you to input your password for sending if the server requires user authentication. Historically speaking, passwords are not necessary to send e-mail messages. This is one reason why e-mail addresses can be faked. In the near future, passwords are always required for sending messages as are for receiving messages.

There are two ways to send messages waiting in +queue. Please note that both of these are commands in Summary mode.

i

If ‘mew-auto-flush-queue’ is ‘t’, the messages being held in +queue will be sent after the incoming messages have been received. This method is appropriate for dial-up environments, since one can save on connection fees and repeated authentication for sending. ‘mew-auto-flush-queue’ is default to ‘t’.

C-cC-c

Send messages in +queue. Method is appropriate if you like to preview composed messages first in +queue and then send them. If ‘mew-ask-flush-queue’ is ‘t’, you are asked, Flush queue? (y or n) ". ‘mew-ask-flush-queue’ is default to ‘nil’.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.9 Signature and citation

Next is the explanation of the commands for processing the text in the body of the message.

The first one is signature. To insert your signature file ("~/.signature") on the cursor point, type ‘C-cTAB’. You can define your own signature file to ‘mew-signature-file’. Setting ‘mew-signature-as-lastpart’ and ‘mew-signature-insert-last’, you can customize the action of ‘C-cTAB’.

C-cTAB

Insert "~/.signature" on the cursor point.

The next one is citation. If you use ‘a’ or ‘A’ in Summary mode, a draft for reply is opened up and Emacs is split into three windows. The top is Summary mode, the middle is Message mode, and the bottom is Draft mode.

Here are the commands for citing text from Message mode to Draft mode.

C-cC-y

Copy and paste a part of a message from Message mode WITH citation prefix and label.

  1. Roughly speaking, it copies the body in Message mode. For example, if Text/Plain is displayed, the entire Message mode is copied. If Message/Rfc822 is displayed, the body without the header is copied.
  2. If you type ‘C-uC-cC-y’, the header is also copied if exists.
  3. If an Emacs mark exists, the target is the region between the mark and the cursor.
C-cC-t

Copy and paste a part of the message from Message mode WITHOUT citation prefix and label.

The default label and prefix is as follows:

From: SUMIKAWA Munechika <sumikawa@ebina.hitachi.co.jp>
Subject: Wine
Date: Wed, 23 Jul 1997 11:40:50 +0900

> Hi, it's Sumikawa, the guy who's neat from good morning 
> to good night.
>
> Talking about the wonderful wine party, I would propose 
> Cabernet Sauvignon, Bordeaux, '90. 

In Draft mode, you can cite any text displayed in Message mode. So, you can cite text from multiple messages easily. Select a message in Summary mode and display it in Message mode, then cite it in Draft mode. Please repeat this procedure as you like. Triple windows are opened for this purpose.

When highlighting gets wrong, type ‘C-cC-l’ to re-highlight both the header and the body


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.10 Composing multipart

Now let’s see how to create multipart messages.

When you are writing a message in +draft/1 and type ‘C-cC-a’, the following lines are inserted at the bottom of the draft.

----------------------------- attachments -----------------------------
      Multipart/Mixed                                         1/     
     1  Text/Plain(guess)                                       CoverPage*
     2                                                          .   
--------0-1-2-3-4-5-6-7-8-9--------------------------------------------

"1/" is a temporary directory to create multipart and provides a location for "~/Mail/attach/1". The part 1, "CoverPage", refers to the body. Now the entire draft looks like:

To: mew-dist
Subject: This is header
X-Mailer: Mew version 6.5 on Emacs 22.3
----
This is the body.

----------------------------- attachments -----------------------------
      Multipart/Mixed                                         1/     
     1  Text/Plain(guess)                                       CoverPage*
     2                                                          .   
--------0-1-2-3-4-5-6-7-8-9--------------------------------------------

Here we designate three regions as follows:

In Draft mode, the key bindings differ according to the region.

To ‘TAB’, for instance, the following functions are assigned:

header

Completions.

body

Insert TAB.

attachments

Do nothing.

To ‘c’, functions are assigned as follows:

header

Insert c.

body

Insert c.

attachments

Copy a file.

The following is a summary of commands in the attachments region.

C-p

Go to the previous file in the current directory.

C-n

Go to the next file in the current directory.

C-f

Go to the first subdirectory.

C-b

Go to the parent directory.

c

Copy a file (possibly via networks) on ".". To copy a remote file, use the "/[user@]hostname:/filepath" syntax.

l

Link a file with a symbolic link on ".". If you want to edit the attached file, you should ‘c’ instead of ‘l’ so that you do not edit the original file.

d

Delete this file or this directory.

m

Create a subdirectory (i.e. multipart) on ".".

f

Open this file into a buffer.

F

Open a new file into a buffer on ".".

y

Link the message which is displayed in Message mode on ".".

e

Input external-body on ".".

a

Sampling voice and insert as audio file on ".".

p

Extract the PGP key for the specified user on ".".

D

Input a description (Content-Description:).

T

Change the data type (Content-Type:).

t

Toggle text and binary for the data type.

I

Specify input coding-system for a Text/* object.

C

Specify output coding-system for a Text/* object.

P

Specify a file name (Content-Disposition:) to save this part in the receiver side. If you type just ‘RET’ without any string, its value is cleared. Then the file name in the sender side is displayed with ‘*’.

In attachments, data types are guessed by suffix. The currently supported suffixes are as follows:

.txt       Text/Plain
.html      Text/Html
.xml       Text/Xml
.rtf       Text/Enriched
.css       Text/Css
.sgml      Text/Sgml
[0-9]+     Message/Rfc822
.ps        Application/Postscript
.pdf       Application/Pdf
.doc       Application/Msword
.xls       Application/Vnd.Ms-Execl
.ppt       Application/Vnd.Ms-Powerpoint
.vsd       Application/Vnd.Visio
.dat       Application/Ms-Tnef
.tar|.tar.|.gz|.Z|.taz|.tgz|.bz2?|.lzh|.zip|.bin|.pgp|.gpg|.exe|.dll
           Application/Octet-Stream
.gif       Image/Gif
.tiff      Image/Tiff
.jpe?g     Image/Jpeg
.png       Image/Png
.xwd       Image/X-Xwd
.xbm       Image/X-Xbm
.xpm       Image/X-Xpm
.bmp       Image/X-Bmp
.pcx       Image/X-Pcx
.tga       Image/X-Tga
.au        Audio/Basic
.wav       Audio/X-Wav
.aif?f     Auido/X-Aiff
.midi?     Auido/X-Midi
.mpga|.mp[23]  Audio/X-Mpeg
.mpe?g     Video/Mpeg
.mov       Video/Quicktime
.avi       Video/X-Msvideo

Please choose an appropriate suffix for the file name so that Mew can guess its data type. If there is no matched suffix, the data type specified by ‘mew-content-type’ is chosen. Its default value is Text/Plain.

For instance, if you copy files with ‘c’, the part becomes as follows:

----------------------------- attachments -----------------------------
      Multipart/Mixed                                         1/   
     1  Text/Plain(guess)                                       CoverPage*
B    2  Image/Gif                    MagicPoint logo            mgp.gif
Q    3  Application/Postscript       Presentation Material      ohp.ps
     4                                                          .
--------0-1-2-3-4-5-6-7-8-9--------------------------------------------

Each line of a multipart message consists of

You can change data types (Content-Type:) by pressing ‘T’ at any time. If the data type is either text (Text/Plain) or binary (Application/Octet-Stream), you can toggle between them using ‘t’.

Please refer to Mark based composer for explanation on changing the mark (Content-Transfer-Encoding:). You can also insert descriptions (Content-Description:) by ‘D’. This description column is overwritten when encrypted as described in Mark based composer.

Strictly speaking, the fifth column is the copied file name or the value of Content-Disposition:, namely the file name to which the receiver saves the part. If Content-Disposition: exists, Mew displays it. Otherwise, Mew displays the copied file name with ‘*’ appended. When you copy a file, the file name is specified as Content-Disposition:. But this is not true for both Message/* and Multipart/*. To specify Content-Disposition: for Message/*, use ‘P’.

Files are treated as singlepart while directories are treated as being multipart. Therefore you can create very complex multipart MIME messages in the same way as you would create a file system. Very easy, isn’t it?

The default data type for directories is Multipart/Mixed. Of course, you can change it by pressing ‘T’.

Once you are ready to send a multipart message, type ‘C-cC-m’ or ‘C-c C-c’ to send it as described the previous subsection.

Next is the explanation of the creation of a Message/External-body by pressing ‘e’. If the access-type is "ftp" or "anon-ftp", you can take advantage of remote filename completion due to the existence of the native Emacs mode of ange-ftp. Of course file completion is available for the access-type of "local-file".

If you want to abort creating multipart and to get back to singlepart, type ‘d’ in the top level of the multipart message.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.11 Defining charset

Mew has a mechanism for determining the character set of the transfer form for both singlepart and multipart.

<Singlepart>

When you type ‘C-cC-m’ or ‘C-cC-c’ to compose a message in Draft mode, Mew decides the character set of the transfer based on the internal representation of its body. On Bilingual Emacs, US-ASCII is chosen for 7bit character sets while ISO-8859-1 is selected for 8bit character sets. On Internationalized Emacs, the character set of the transfer form is chosen based on rules defined by Mew.

<Multipart>

Since the data to be attached as a part of multipart is a file, it is stored on disk. Therefore, in order to determine its character set for the transfer form, it is necessary to load the file into an Emacs buffer converting it into internal representation. After that, Mew determines the character set of the transfer form for the file by the same method as singlepart.

On Bilingual Emacs, Mew reads a file as is. So if the file is 7bit, US-ASCII is chosen. Otherwise ISO-8859-1 is selected.

On Internationalized Emacs, Mew reads a file according to the local convention (i.e. auto conversion). The command to set a local convention is ‘C-x RET l’.

For example, in Japan, ISO-2022-JP, EUC-JP, and Shift_JIS is readily guessed and stored in buffer as internal representations for Japanese. Mew chooses ISO-2022-JP as the character set of the transfer form from the internal representation. That is, even if the character set of the file is EUC-JP or Shift_JIS, it is automatically converted into ISO-2022-JP, which is the transfer form for Japanese. This means that you can attach a file without needing to pay attention to its character set.

If you want to specify the coding-system of a file to be attached, type ‘I’. Let’s call the character set "input character set". Also, if you want to specify the coding-system of the transfer form, use ‘C’.

Information regarding the character set is displayed in parentheses. If the character set of the transfer form is specified explicitly, it is displayed. Otherwise, if the input character set is specified, it is displayed with "*". Otherwise, "guess" is displayed.

Let’s look at the following example. Since part 1 is a body, it is stored in an Emacs buffer. Because "guess" is displayed, it is Mew that determines the character set of the transfer form according to the rules that Mew defines.

Since iso-8859-1 is specified as the input character set, Mew loads the file considering that its character set is iso-8859-1, and then converts it into internal representation. The character set of the transfer form is decided according to rules defined by Mew.

The input character set in part 3 cannot be identified just from this example. (But a user certainly knows what it is since he actually specified it.) In any case, a file will be loaded and be converted into internal representation, then be converted into EUC-JP which is specified as the character set of the transfer form.

----------------------------- attachments -----------------------------
      Multipart/Mixed                                         1/     
     1  Text/Plain(guess)                                       CoverPage*
     2  Text/Plain(*iso-8859-1)                                 text1
B    3  Text/Plain(euc-jp)                                      text2
     4                                                          .    
--------0-1-2-3-4-5-6-7-8-9--------------------------------------------

Note that both ‘C’ and ‘I’ are not available on Bilingual Emacs.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.12 Handling long lines

For a long period, when you are writing a message, you should fold each line around 70 characters by yourself. RFC 3676 extended Text/Plain and defined "flowed" as a value of the "format" parameter.

Thanks to this, long lines can be automatically folded on a sender side while they can be unfolded on a receiver side. From the point of user view, you can write long lines casually.

There are two ways to apply the flowed folding.

1) To apply the flowed folding explicitly, type ‘C-cC-f’.

Then, Mew sees if long lines exist in a draft. If long lines whose length is over ‘mew-flowed-fold-threshold’ are found, Mew applies the "flowed" folding. This variable defaults to 78.

mew-flowed-fold-length’ controls the max length of folded lines. Its initial value is 70.

Folding method is decided according to character set. If the language is separated by SPC, the new line characters are inserted after existing SPCs(delsp=no). Otherwise, pairs of SPC and the new line character are inserted in appropriate positions(delsp=yes).

If you type ‘C-cC-f’ again, the folded lines are unfolded.

2) If ‘mew-use-format-flowed’ is ‘t’, this functionality is took into account automatically at composing with ‘C-cC-c’ or ‘C-cC-m’. Its default value is ‘nil’.

3) You can toggle the value of ‘mew-use-format-flowed’ by ‘C-cC-pC-f’.

Note that folded lines with the "flowed" folding are always unfolded on viewing regardless of the value of ‘mew-use-format-flowed’. If you feel it is hard to see long lines, use ‘_’ in Summary mode.

If ‘mew-flowed-auto-wrap’ is ‘t’, at visualizing a message, ‘_’ is automatically executed so as unfolded lines are folded. The default value of ‘mew-flowed-auto-wrap’ is ‘t’.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.13 Replying to a message and deciding recipients

As distinguished from the case of a new message, where the writer specifies the addresses of the To:, Cc: or Newsgroups: fields, in a reply message addresses are automatically generated.

When ‘a’ and ‘A’ is used in Summary mode, a new draft is prepared in Draft mode. Values of To:, Cc:, and Newsgroups: are prepared according to three alists.

  1. If called with ‘C-u’, replying to the sender/poster only. In this case, ‘mew-reply-sender-alist’ is used.
  2. If this message is sent by ME, you probably intend to reply with the original header. In this case, ‘mew-reply-fromme-alist’ is used.
  3. Otherwise, replying to all people listed. In this case, ‘mew-reply-all-alist’ is used.

The default value of ‘mew-reply-sender-alist’ is as follows:

'(("Reply-To:"
   ("To:" "Reply-To:" "From:"))
  (t
   ("To:" "From:")))

This is read as follows:

  1. If Reply-To: exists, copy the values of Reply-To: and From: to new To:.
  2. Otherwise, copy the value of From: to To:.

If you would like to reply only to the address on Reply-To: (if any), set ‘mew-reply-sender-alist’ like this:

(setq mew-reply-sender-alist
      '(("Reply-To:"
         ("To:" "Reply-To:"))
        (t
         ("To:" "From:"))))

The default value of ‘mew-reply-fromme-alist’ is as follows:

'((t
   ("To:" "To:")
   ("Cc:" "Cc:")
   ("Newsgroups:" "Newsgroups:"))))

This is read as follows:

  1. Copying the value of To: to new To: and copying the value of Cc: to new Cc: and copying the value of Newsgroups: to new Newsgroups:.

The default value of ‘mew-reply-all-alist’ is as follows:

'((("Followup-To:" "poster")
   ("To:" "From:"))
  ("Followup-To:"
   ("Newsgroups:" "Followup-To:" "Newsgroups:"))
  ("Newsgroups:"
   ("Newsgroups:" "Newsgroups:"))
  ("Reply-To:"
   ("To:" "Reply-To:" "From:")
   ("Cc:" "To:" "Cc:" "Apparently-To:"))
  (t
   ("To:" "From:")
   ("Cc:" "To:" "Cc:" "Apparently-To:")))

This is read as follows:

  1. If the value of Followup-To: is "poster", copying the value of From: to new To:.
  2. If Followup-To: exists, copying the values of Followup-To: and Newsgroups: to new Newsgroups:.
  3. If Newsgroups: exists, copying the value of Newsgroups: to Newsgroups:.
  4. If Reply-To: exists, copying the values of Reply-To: and From: to new To:. And copying the values of To:, Cc:, and Apparently-To: to new Cc:.
  5. Otherwise, copying the value of From: to new To:. And copying the values of To:, Cc:, and Apparently-To: to new Cc:.

You may want to set ‘mew-reply-all-alist’ like this:

(setq mew-reply-all-alist
      '((("Followup-To:" "poster")
         ("To:" "From:"))
        ("Followup-To:"
         ("Newsgroups:" "Followup-To:"))
        ("Newsgroups:"
         ("Newsgroups:" "Newsgroups:"))
        ("Reply-To:"
         ("To:" "Reply-To:"))
        (t
         ("To:" "From:")
         ("Cc:" "To:" "Cc:" "Apparently-To:"))))

If there are multiple entries for a certain address, they are unified. Addresses ending with ":;", which indicates anonymous recipients, are automatically removed.

Your addresses are automatically removed. Your addresses are automatically defined to ‘mew-mail-address-list’ according to, for example, ‘mew-config-alist’. If you dislike this value, you can also explicitly set it like this:

(setq mew-mail-address-list
       '("^pooh@[a-z]*.example.org$"
         "^pooh@example.net$"
         "^winnie@example.jp$"))

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.14 Forwarding messages

To forward messages, type ‘f’ or ‘F’ in Summary mode. Then Draft mode appears and the messages are already attached in the attachments region.

Also, you can prepare the attachments region by yourself, then copy (‘c’) the messages or make links (‘l’) to the messages. If the file names of the messages are numeric ([0-9]+), they are automatically considered as messages. ‘y’ is very convenient because it make a link to the message displayed in Message mode.

By default, the entire message is forwarded. If you want to remove some parts of its header, define ‘mew-field-delete-for-forwarding’. The following is an example to remove "Received:" and "Return-Path:" when forwarded.

(setq mew-field-delete-for-forwarding '("Received:" "Return-Path:"))

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.15 Re-sending messages

You may occasionally wish to send messages modifying the header of a message.

For instance, you may want to send a message with the same body to multiple receivers independently. Please imagine the case where you put a created message destined to Pooh in +queue and then you wish to send an another message to Piglet by copying it and modifying its header. Let’s call this recycle sending.

Also, you occasionally wish to send a message adding the Resent-To: field to a target message. This is a kind of forwarding. This is called header conversion because a message header is modified. The forwarding described the previous subsection is called encapsulation because a message is embedded into another new message.

Header mode exists for this reason, modifying a part of the header, sending/queuing the created message. You can think this is a kind of Draft mode which prohibits modifications of its body.

The following commands are provided in Summary mode to enter Header mode.

W

Recycle sending. Enter Header mode in order to modify To:, Cc:, From: of a target message. Typical usage is for messages in +queue or +postq.

r

Re-sending. Enter Header mode in order to add Resent-To:, Resent-Cc:, Resent-From: of a target message. Re-sending may confuse receivers, so you should think carefully before using it.

In Header mode, you can make use of completion and circular completion like in Draft mode. When you are finished inputting the header, send the message using one of the following commands. You may be concerned because the body of the message is not displayed in your new message. But you need not worry, since the body and a part of the target message is certainly used.

C-cC-m

Compose a message, put it into +queue or +postq, and let it be waiting to be sent.

C-cC-c

Compose a message and send it. You are asked, "Really send this message? (y or n) ". Type ‘y’ to send it.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.16 Creating signature or cipher message

This section explains the method for signing or encrypting "text only" messages with PGP or S/MIME. The following commands are explained.

C-cC-s

Sign the entire draft. Input your pass-phrase.

C-cC-e

Encrypt the entire draft.

C-cC-b

Sign, and then encrypt the entire draft. Input your pass-phrase.

C-cC-r

Encrypt, and then sign the entire draft. Input your pass-phrase.

To encrypt a message, receivers’ public keys are used. On the other hand, your secret key is used to sign a message, and so you need to input your pass-phrase when applying the signature. Note that if you are using the pass-phrase cache or the master password mechanism and there are pass-phrases presently cached, you do not have to type your pass-phrase (see section Password).

These commands create a PGP/MIME message by default. If you want to use S/MIME, configure as follows:

(setq mew-draft-privacy-method 'smime)

You can change this variable with ‘C-cC-pC-m’ in Draft mode.

We can consider that these four commands above are shortcut methods of mark based composing described in the next section.

To sign a message, type ‘C-cC-s’. When signing, because your secret key is needed to be decrypted, you may be asked for your pass-phrase if it is not cached. Created messages are stored in +queue or +postq.

Your secret key is identified in From: address. If From: does not exist, your default secret key is selected. When you want to specify a secret key that is not identified the address of From:, type ‘C-uC-cC-s’.

To encrypt a message, type ‘C-cC-e’. A message is encrypted with public keys identified with the addresses on To: and Cc:. Since this is encryption only, you are not asked for your pass-phrase. Created cipher messages are stored in +queue.

This message is encrypted with your public key in addition to those of the receivers. Therefore you can decrypt created messages. For example, you can go to +queue by ‘g’ and preview a created message to reconfirm this.

To sign a draft and then encrypt it, type ‘C-cC-b’. To encrypt a draft and then sign it, type ‘C-cC-r’. In both cases, created messages are stored in +queue.

It is very likely that you will forget to sign and/or encrypt a draft even if you intended to do so. To prevent this, Mew provides an mechanism to automatically sign or encrypt a message when ‘C-cC-m’ or ‘C-cC-c’ is typed.

If you want to protect privacy of all drafts, set ‘mew-protect-privacy-always’ to ‘t’ and set ‘mew-protect-privacy-always-type’ to one of services.

If you want to protect the privacy of drafts when replying encrypted messages, set ‘mew-protect-privacy-encrypted’ to ‘t’ and set ‘mew-protect-privacy-encrypted-type’ to one of the services. This configuration is preferred to the configuration for all drafts described above in the case of replying encrypted messages.

The following services are available. The strings enclosed in braces are the symbols for each service. The service applied when typing ‘C-cC-m’ or ‘C-cC-c’ is displayed in the mode line.

pgp-signature (PS)

Sign with PGP

pgp-encryption (PE)

Encrypt with PGP

pgp-signature-encryption (PSPE)

Sign then encrypt with PGP

pgp-encryption-signature (PEPS)

Encrypt then sign with PGP

pgp-signature (SS)

Sign with S/MIME

pgp-encryption (sE)

Encrypt with S/MIME

pgp-signature-encryption (SSSE)

Sign then encrypt with S/MIME

pgp-encryption-signature (SESS)

Encrypt then sign with S/MIME

The following example works for signing all drafts.

(setq mew-protect-privacy-always t)
(setq mew-protect-privacy-always-type 'pgp-signature)

The following example is for encrypting drafts with PGP when replying encrypted messages.

(setq mew-protect-privacy-encrypted t)
(setq mew-protect-privacy-encrypted-type 'pgp-encryption)

In Draft mode, ‘C-cC-pC-a’ toggles ‘mew-protect-privacy-always’ and ‘C-cC-pC-e’ toggles ‘mew-protect-privacy-encrypted’.

You can specify privacy services for the current draft in Draft mode beforehand so that you do not forget to apply the privacy services when sending. To set privacy services to the current draft evaluated when typing ‘C-cC-m’ or ‘C-cC-c’, type ‘C-cC-pC-d’, and then input one of privacy services listed above. To cancel the current privacy service, just type ‘RET’ instead of selecting the privacy service.

When you compose a message by ‘C-cC-c’ or ‘C-cC-m’, and if signing and/or encryption fails, the cursor gets back to the draft. At this time, the service that you specified is canceled. If you type ‘C-cC-c’ or ‘C-cC-m’ in this situation, a plain message is created, so please be careful. After correcting the cause of the failure, if you want the same service, type ‘C-cC-pC-d’ to specify your service explicitly or use ‘C-cC-s’, ‘C-cC-e’, etc.

If ‘mew-use-old-pgp’ is set to ‘t’ (the default value is ‘nil’), ‘C-cC-s’ and ‘C-cC-e’, etc create old fashioned PGP message instead of PGP/MIME. If the attachment region exists, an error occurs.

mew-protect-privacy-*’ described above are effective only to PGP/MIME, not to old PGP. If you want to create old PGP signature with ‘C-cC-m’ or ‘C-cC-c’ always, set ‘mew-protect-privacy-with-old-pgp-signature’ to ‘t’.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17 Mark based composer

To support PGP/MIME, S/MIME and ZIP, mark based composing is provided. Remember the previous example.

----------------------------- attachments -----------------------------
      Multipart/Mixed                                         1/
     1  Text/Plain(guess)                                       CoverPage*
B    2  Image/Gif                    MagicPoint logo            mgp.gif
Q    3  Application/Postscript       Presentation Material      ohp.ps
     4                                                          .
--------0-1-2-3-4-5-6-7-8-9--------------------------------------------

You can find the ‘B’ mark and the ‘Q’ mark at the beginning of the line. Mew provides you with a new concept of "encoding". Encoding includes Base64, Quoted-Printable, Gzip64 (Gzip + Base64), signature, encryption.

At present, 8 marks are prepared.

" "

No encoding. But 8bit text would be encoded.

B

Base64

Q

Quoted-Printable

G

Gzip64 (compressed with gzip then encoded with Base64. This is experimental. Do not use this if receivers do not use Mew.)

PS

Sign with PGP

PE

Encrypt with PGP

SS

Sign with S/MIME

SE

Encrypt with S/MIME

Additional key binding for marks in attachments is as follows:

B

Put the ‘B’ mark to encode with Base64.

Q

Put the ‘Q’ mark to encode with Quoted-Printable.

G

Put the ‘G’ mark to encode with Gzip64. This is applicable only to Text/Plain and Application/Postscript since compression is not effective with other objects. For example, JPEG is already compressed.

S

Put the ‘PS’ mark to sign with PGP.

E

Put the ‘PE’ mark to encrypt with PGP. Input decrypters’ addresses.

M-s

Put the ‘SS’ mark to sign with S/MIME.

M-e

Put the ‘SE’ mark to encrypt with S/MIME. Input decrypters’ addresses.

Z

Encrypt the part with ZIP immediately. After the encryption, the ‘B’ mark appears.

U

Unmark. The original mark appears.

Consider the following example: The second part will be signed with PGP then encrypted with PGP for "kazu". Don’t be alarmed. Its description is overwritten but saved. The third part will be encoded with Gzip64.

----------------------------- attachments -----------------------------
      Multipart/Mixed                                         1/
     1  Text/Plain(guess)                                       CoverPage*
PSPE 2  Image/Gif                    kazu@example.org          mgp.gif
G    3  Application/Postscript       Presentation Material      ohp.ps
     4                                                          .
--------0-1-2-3-4-5-6-7-8-9--------------------------------------------

After applying marks, type ‘C-cC-m’ or ‘C-cC-c’ to create messages.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.18 PGP key distribution

To distribute a PGP public key, please use ‘p’ on attachments in Draft mode. It asks whose public key you want to distribute. Just type ‘RET’ if it is yours. If you want to distribute someone else’s key, input his e-mail address with completion. The PGP public key will distributed as Content-Type: Application/Pgp-Keys.

If Mew finds that the part is Application/Pgp-keys, it tries to add the PGP public key onto your PGP public keyring. Remember that Mew is not responsible for TRUST or VALIDITY. It is YOU who set these values. Please use the commands described by Mew to set these as necessary. If you do not know the meaning of TRUST and VALIDITY, you should learn the web of trust system provided by PGP BEFORE using PGP to protect your privacy.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.19 Sending messages with anonymous receivers

You may occasionally wish to send a message to anonymous receivers.

For instance, please imagine that Pooh is trying to invite multiple friends to a party. Piglet should reply only to Pooh. However, Piglet might make a mistake of replying to other people if the addresses of all the invitees are listed in Cc:. Moreover, Pooh does not want to disclose the names of those who he invited until the day of the party.

To handle this, Mew makes use of ":;" for anonymous addresses. Please look at the following example.

To: party:piglet@example.org,roo@example.org;
From: Pooh <winnie-the-pooh@example.net>

Here, there is a colon (":") after the explanatory comment "party". This is followed by some addresses that are delimited by "," and terminated by ";". If you write addresses in this format, Mew sends the message to the addresses with them removed form the header. In this example, Piglet and Roo will receive the following message.

To: party:;
From: Pooh <winnie-the-pooh@example.net>

The receiver knows that the sender is Pooh, but will not know who else received the message. Also, the string "party:;" is not address, so the receiver cannot reply to it.

You should understand that enumerating many addresses on To: or Cc: is basically not a good practice anyway. If you often have the occasion to send messages a set group of people, you should create a mailing-list.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated on April 16, 2012 using texi2html 5.0.