Please enable JavaScript to view this site.

A-Shell Reference

The To: header field should not be confused with the to parameter. The former is used mainly by the email reader application to format the message, whereas the latter is a critical parameter given directly to the SMTP server prior to the message. The SMTP server only wants an unadorned address for routing purposes, whereas the email reader may appreciate a fancier one, possibly including a text name in addition to the actual address. The actual to parameter is typically not visible to the reader at all, whereas the To: header field is possibly the first thing he or she sees. An important ramification of this dichotomy between the to parameter and the To: header field is that if you want to send your message to multiple people, you must specify them all in the to parameter, but you do not have to (and may not want to) do so in the To: header field. (You might want to use the cc: or bcc: header fields instead, or not at all.). To see an example of this, just look at the headers generated by any mass-mailed message (or junk mail message.) Typically, the actual To: header line will have nothing to do with you, and your email address will not appear anywhere in the header at all.

Taking the example of traditional postal mail for comparison, the to parameter is analogous to the address on the outside of the envelope, whereas the To: header field is analogous to the heading or salutation at the top of the letter inside the envelope. Similarly, if you want to copy your letter to multiple people, you have the option of including a cc: header in your letter, but the only way the message will actually be delivered multiple recipients is if you use multiple envelopes (i.e. multiple to addresses.)