6 * Address Take -- steals addresses from incoming email messages. Searches
7 * the To, Cc, From and Reply-To headers.
9 * @copyright © 1999-2006 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
13 * @subpackage abook_take
17 * Path for SquirrelMail required files.
19 define('SM_PATH','../../');
21 /* SquirrelMail required files. */
22 require_once(SM_PATH
. 'include/validate.php');
23 require_once(SM_PATH
. 'functions/addressbook.php');
25 displayPageHeader($color, 'None');
28 sqgetGlobalVar('email', $email, SQ_POST
);
30 $abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
32 $abook = addressbook_init(false, true);
35 foreach ($email as $Val) {
36 if (valid_email($Val, $abook_take_verify)) {
39 $addrs[$Val] = 'FAIL - ' . $Val;
43 $formdata=array('email'=>$addrs);
45 abook_create_form(SM_PATH
. 'src/addressbook.php','addaddr',_("Add to address book"),_("Add address"),$formdata);