dolibarr/htdocs/core/modules/mailings
florian HENRY 1d96f5316e travis
2016-07-05 15:14:28 +02:00
..
advthirdparties.modules.php travis 2016-07-05 15:14:28 +02:00
contacts1.modules.php Merge remote-tracking branch 'origin/3.7' into 3.8 2015-10-01 11:16:35 +02:00
contacts2.modules.php Merge remote-tracking branch 'origin/3.7' into 3.8 2015-10-01 11:16:35 +02:00
contacts3.modules.php Several css enhancements 2016-04-22 11:11:08 +02:00
contacts4.modules.php Several css enhancements 2016-04-22 11:11:08 +02:00
example.modules.php Use rfc6761 example.com domain instead of domain.com in examples 2015-06-08 17:13:23 +02:00
fraise.modules.php Scrutinizer Auto-Fixes 2016-04-09 13:07:33 +00:00
framboise.modules.php [Qual] Fixed HTML input form disabled attribute 2015-05-07 14:21:14 +02:00
index.html Removed index.php and replaced them with blank index.html as it is more appropriate 2014-07-12 23:18:57 +02:00
modules_mailings.php Debug Advance target emailing 2016-04-01 14:30:02 +02:00
pomme.modules.php NEW Can filter on status employee when building emailing from users 2016-04-22 11:09:31 +02:00
README
thirdparties_services_expired.modules.php Clean language files 2016-06-18 11:06:11 +02:00
thirdparties.modules.php NEW: Feature request: A page to merge two thirdparties into one #2613 2015-04-18 20:41:09 +02:00
xinputfile.modules.php Fix code standard 2015-04-06 12:22:52 +02:00
xinputuser.modules.php Fix code standard 2015-04-06 12:22:52 +02: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/core/modules/mailings/example.modules.php
into
htdocs/core/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.