-to -cc -bcc

Over time people have asked about including a person's name with an email address, and Harry included this usefulness in his code, which then transferred to 2.0.0. I would like to add a bit of information on how to use this properly.

People names can be formed in a variety of ways, such as "first last", "last, first", and "nickname". It is important to note the comma that separates individual portions of a person's name, this will be explained shortly.

When choosing to include a person's name with their email address, you need to include quotation marks (") around the whole thing, not simply around the person's name. For example, "Tim Musson <nul@localhost.com>" is in a valid command line format, while "Tim Musson"<nul@localhost.com> is not.

If you wish to include a comma in the person's name, to make this work because of the C language that Blat is written in, you must include a second set of quotation marks within the first. To get this done, you need to use the backslash (\) immediately before each quotation mark that surrounds the person's name. Using Tim's name as another example, we could use a comma in his name by writing it as: "\"Musson, Tim\" <nul@localhost.com>"

Internally to the Blat program, what it would see in the above example is "Musson, Tim" <nul@localhost.com>, without the extra quotation marks that you used to group his name and email address together as a single string.

The backslash tells the command line parser to keep the next character. Sometimes, this may lead to unexpected results if the next character is not a quotation mark, or if used in the wrong place, so be careful how and when you use the backslash.

As a bonus, you may use your name in the profiles when running the -install option. With my very limited testing, this may or may not work with your SMTP server, depending on how it is configured and which software it uses. The same rule applies here as it does with the -to, -cc, and -bcc options.

blat -install server "your name <email addy>" - -

Chip