FromCSV plugin is intended for merging mailing with data from CSV file (Comma Separated Values), like FromSQL plugin provide a merging mailing with database. Microsoft Excel, Outlook Express and other popular programs support data export to CSV files. Please, read “Internal SMTP server and mailboxes” article if ADR plugins ideology is not familiar to you.
.EXE and .DLL versions of plugin are in \plugins\FromCSV subdirectory of the directory with Advanced Direct Remailer. The plugin use FromCSV.INI configuration file and FromCSV.CSV data file. Also, you can find its complete C++ source code in plugin’s subdirectory. Plugin was compiled by Microsoft Visual C++ 6.0.
CSV file is datasheet. The first line of file is banner headline. The rest ones are data. The example of CSV file:
Name, Email, Web Page, ID
Alexander Gorlach, gorlach@mail.com, www.mailutilities.com, 10282
Andrey Cherezov, ac@eserv.ru, www.etype.net, 12992
TheBat Team, support@ritlabs.com, www.ritlabs.com, 11020
Val Kat, vkat@soft.com, www.soft.com, 10230
The values in file must be in quotes (e.g., “Vladimir Katalov, Managing Director”), if they contain separator character. The list separator character is specified in regional settings of operating system. Also you can override this setting in FromCSV.INI configuration file.
Use %%1%%, %%2%%, etc. macros to substitute values into the letter template. This macros refer to data from the first, second and following “columns” of CSV file. Also you can use %%Name%% instead of %%1%%, %%Email%% instead of %%2%%, %%Web Page%% instead of %%3%% and so on for given example, according with columns names in CSV file. Note that macros are case sensitive (%%EMAIL%% is not equivalent to %%Email%%). For example, the next letter:
From: info@mydomain.com
To: %%Name%% <ac@eserv.ru>
Hello, %%1%%!
We add your web-page %%Web Page%% to our directory. Please,
check us here:
http://mydomain.com/%%ID%%.html
Thank you, %%1%%!
MyDomain Team
www.mydomain.com
will be changed into the following letter (the data from line contained recipient address ac@eserv.ru will be used) after its processing by FromCSV plugin:
From: info@mydomain.com
To: Andrey Cherezov <ac@eserv.ru>
Hello, Andrey Cherezov!
We add your web-page www.etype.net to our directory. Please,
check us here:
http://mydomain.com/12992.html
Thank you, Andrey Cherezov!
MyDomain Team
www.mydomain.com
The letter example and CSV file example are placed in directory with plugin.