dolibarr/htdocs/includes/modules/mailings
Laurent Destailleur c7dfa3d8fc Doxygen
2011-05-25 13:03:24 +00:00
..
.cvsignore Fix: Restore stable version for 3.0 2010-12-14 23:27:17 +00:00
contacts1.modules.php Debug of new emailing modules: Add link to third party, and removed some too long statistics. 2011-03-23 23:59:21 +00:00
contacts2.modules.php Fix: If no filter is provided, no filter must be applied. 2011-03-24 00:25:51 +00:00
contacts3.modules.php Fix: Some contacts were lost. Number in colume "Total number" must be "total number" with no filter. Value after filtering is show inside the filter list. 2011-03-24 00:13:19 +00:00
example.modules.php Can add additionnal fields in emailings selectors 2009-01-25 22:04:55 +00:00
fraise.modules.php Debug of new emailing modules: Add link to third party, and removed some too long statistics. 2011-03-23 16:24:23 +00:00
framboise.modules.php Doxygen 2011-05-25 13:03:24 +00:00
modules_mailings.php Restore work lost by savannah backup 2010-12-01 21:51:13 +00:00
peche.modules.php Restore work lost by savannah backup 2010-12-01 21:51:13 +00:00
pomme.modules.php Fix: Use same logic for all selectors. By default "no filter". 2011-03-24 00:35:45 +00:00
README Can add additionnal fields in emailings selectors 2009-01-25 22:04:55 +00:00
thirdparties_services_expired.modules.php Debug of new emailing modules: Add link to third party, and removed some too long statistics. 2011-03-23 16:24:23 +00:00
thirdparties.modules.php Debug of new emailing modules: Add link to third party, and removed some too long statistics. 2011-03-23 16:24:23 +00:00

README (english)
------------------------------------
Adding your own email selector module
------------------------------------


If you want to add your own emails selector/import module. This is steps to follow
to add you own email predefined selector:


***** STEP 1 *****

Copy file
htdocs/includes/modules/mailings/example.modules.php
into
htdocs/includes/modules/mailings/myselector.modules.php

You can choose value of your choice instead of "myselector" in name
of new file.


***** STEP 2 *****

Edit this file myselector.modules.php and change following text:

"class mailing_example"           into    "class mailing_myselector"
"var $name='example';"            into    var $name='myselector';
"var $desc='...';"                into    var $desc='A text to describe selector';
"function mailing_example"        into    "function mailing_myselector"

Then add code inside the "add_to_target" function. What you must do is simply
fill the $target PHP array with one record for each email your selector must return.

You can choose the way you get data: From a file, a database. You are free,
the only requirement is that the $target array is filled by records that are
themselves array of: ('email', 'name', 'firstname', 'other').

This is for example how you can fill the $target array:

// ----- Your code start here -----
$target[0]=array('email'=>'email_0','name'=>'name_0','firstname'=>'firstname_0', 'other'=>'other_0');
...
$target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n', 'other'=>'other_n');
// ----- Your code end here -----



***** STEP 3 *****

Once this file has been edited, you can go to the Dolibarr emailing feature,
you will see a new line selector in the "targets" editor of emailing tool.