Manitou-Mail Home

2. Data file

The mailmerge data is submitted in a file in CSV format, encoded in the current locale. The normal separator between fields is the comma, but tabs and semicolons are also accepted.

If there are no variables in the template, the data file should contain only one column for the recipient address, with one line per recipient. A header line is not expected to be present.

On the other hand, if there are variables in the template, there must be a CSV header line at the very beginning of the file, with the column names matching the names of variables for the merge process. Also, the first column is assigned by convention to the recipient address. In the examples below, the name "email" is given to this column.

Here is an example of a simple data file containing two records, with the variables title, firstname and name in addition to the mandatory email field.


Fields may contain newlines, when they're enclosed in double quotes. Here is another valid data file, with two records and a postal address field spanning multiples lines:

"email","name","postal address","country"
"","Daniela Sosa","Casilla de Correo 432
Correo Central
C1000WAM Capital Federal","ARGENTINA"
"","Mr W Heisenberg","U 235

Double quotes in the data itself must be represented as two successive double quotes.

Once the mailing is stored in the database, the data files and template files if any can be discarded, since theirs contents are stored into the database as part of the mailing data. They will be later removed from the database if and when the mailing gets deleted.