25include_once DOL_DOCUMENT_ROOT.
'/core/modules/mailings/modules_mailings.php';
26require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
34 public $name =
'EmailsFromUser';
36 public $desc =
'EMails input by user';
37 public $require_module = array();
38 public $require_admin = 0;
43 public $picto =
'generic';
44 public $tooltip =
'UseFormatInputEmailToTarget';
69 $langs->load(
"users");
112 $s .=
'<input type="text" name="xinputuser" class="flat minwidth300" value="'.GETPOST(
"xinputuser").
'">';
126 global
$conf, $langs, $_FILES;
128 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
130 $tmparray = explode(
';',
GETPOST(
'xinputuser'));
132 $email = $tmparray[0];
133 $lastname = empty($tmparray[1]) ?
'' : $tmparray[1];
134 $firstname = empty($tmparray[2]) ?
'' : $tmparray[2];
135 $other = empty($tmparray[3]) ?
'' : $tmparray[3];
138 if (!empty($email)) {
142 'lastname' => $lastname,
143 'firstname' => $firstname,
147 'source_type' =>
'file'
150 return parent::addTargetsToDatabase($mailing_id, $cibles);
152 $langs->load(
"errors");
153 $this->error = $langs->trans(
"ErrorBadEMail", $email);
157 $langs->load(
"errors");
158 $this->error = $langs->trans(
"ErrorBadEmail", $email);
Parent class of emailing target selectors modules.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...