Merge pull request #157 from FHenry/develop
Add __MAILTOEMAIL__ and configutation gobal varialbe of Check Read and
This commit is contained in:
commit
97f4a74ad0
@ -44,11 +44,14 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
|
|
||||||
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
|
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
|
||||||
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
||||||
|
$checkread = GETPOST('value','alpha');
|
||||||
|
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
$res=dolibarr_set_const($db, "MAIN_SOCIETE_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -101,6 +104,25 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
|
|||||||
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("ActivateCheckRead").'</td><td>';
|
||||||
|
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE==1)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=0">';
|
||||||
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
|
|
||||||
|
|||||||
@ -49,6 +49,7 @@ $substitutionarray=array(
|
|||||||
'__EMAIL__' => 'EMail',
|
'__EMAIL__' => 'EMail',
|
||||||
'__LASTNAME__' => 'Lastname',
|
'__LASTNAME__' => 'Lastname',
|
||||||
'__FIRSTNAME__' => 'Firstname',
|
'__FIRSTNAME__' => 'Firstname',
|
||||||
|
'__MAILTOEMAIL__' => 'MailtoEmail',
|
||||||
'__OTHER1__' => 'Other1',
|
'__OTHER1__' => 'Other1',
|
||||||
'__OTHER2__' => 'Other2',
|
'__OTHER2__' => 'Other2',
|
||||||
'__OTHER3__' => 'Other3',
|
'__OTHER3__' => 'Other3',
|
||||||
@ -73,6 +74,7 @@ $substitutionarrayfortest=array(
|
|||||||
'__EMAIL__' => 'TESTEMail',
|
'__EMAIL__' => 'TESTEMail',
|
||||||
'__LASTNAME__' => 'TESTLastname',
|
'__LASTNAME__' => 'TESTLastname',
|
||||||
'__FIRSTNAME__' => 'TESTFirstname',
|
'__FIRSTNAME__' => 'TESTFirstname',
|
||||||
|
'__MAILTOEMAIL__' => 'TESTMailtoEmail',
|
||||||
'__OTHER1__' => 'TESTOther1',
|
'__OTHER1__' => 'TESTOther1',
|
||||||
'__OTHER2__' => 'TESTOther2',
|
'__OTHER2__' => 'TESTOther2',
|
||||||
'__OTHER3__' => 'TESTOther3',
|
'__OTHER3__' => 'TESTOther3',
|
||||||
@ -208,8 +210,9 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
|
|||||||
$substitutionarray=array(
|
$substitutionarray=array(
|
||||||
'__ID__' => $obj->source_id,
|
'__ID__' => $obj->source_id,
|
||||||
'__EMAIL__' => $obj->email,
|
'__EMAIL__' => $obj->email,
|
||||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>',
|
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||||
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||||
|
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
||||||
'__LASTNAME__' => $obj->nom,
|
'__LASTNAME__' => $obj->nom,
|
||||||
'__FIRSTNAME__' => $obj->prenom,
|
'__FIRSTNAME__' => $obj->prenom,
|
||||||
'__OTHER1__' => $other1,
|
'__OTHER1__' => $other1,
|
||||||
@ -1048,6 +1051,7 @@ else
|
|||||||
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
||||||
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
||||||
}
|
}
|
||||||
|
print '__MAILTOEMAIL__ = '.$langs->trans("MailtoEMail").'<br>';
|
||||||
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
|
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
|
||||||
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';
|
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';
|
||||||
print '__OTHER1__ = '.$langs->trans("Other").'1<br>';
|
print '__OTHER1__ = '.$langs->trans("Other").'1<br>';
|
||||||
|
|||||||
@ -75,6 +75,8 @@ SentTo=Sent to <b>%s</b>
|
|||||||
MailingStatusRead=Read
|
MailingStatusRead=Read
|
||||||
CheckRead=Read Receipt
|
CheckRead=Read Receipt
|
||||||
YourMailUnsubcribeOK=The email <b>%s</b> is correctly unsubcribe from mailing list
|
YourMailUnsubcribeOK=The email <b>%s</b> is correctly unsubcribe from mailing list
|
||||||
|
MailtoEMail=Hyper link to email
|
||||||
|
ActivateCheckRead=Activate Read receipt and unsubcribe tag
|
||||||
|
|
||||||
# Libelle des modules de liste de destinataires mailing
|
# Libelle des modules de liste de destinataires mailing
|
||||||
MailingModuleDescContactCompanies=Contacts of all third parties (customer, prospect, supplier, ...)
|
MailingModuleDescContactCompanies=Contacts of all third parties (customer, prospect, supplier, ...)
|
||||||
|
|||||||
@ -75,6 +75,8 @@ SentTo=Envoyés à <b>%s</b>
|
|||||||
MailingStatusRead=Lu
|
MailingStatusRead=Lu
|
||||||
CheckRead=Accusé de lecture
|
CheckRead=Accusé de lecture
|
||||||
YourMailUnsubcribeOK=L'adresse e-mail <b>%s</b> est bien désincrite de la liste.
|
YourMailUnsubcribeOK=L'adresse e-mail <b>%s</b> est bien désincrite de la liste.
|
||||||
|
MailtoEMail=Ecrire a e-mail (lien)
|
||||||
|
ActivateCheckRead=Activer les tag d'accusé de lecture et de désincription
|
||||||
|
|
||||||
# Libelle des modules de liste de destinataires mailing
|
# Libelle des modules de liste de destinataires mailing
|
||||||
MailingModuleDescContactCompanies=Contacts de tiers (prospects, clients, fournisseurs...)
|
MailingModuleDescContactCompanies=Contacts de tiers (prospects, clients, fournisseurs...)
|
||||||
|
|||||||
@ -139,8 +139,9 @@ if ($resql)
|
|||||||
$substitutionarray=array(
|
$substitutionarray=array(
|
||||||
'__ID__' => $obj->source_id,
|
'__ID__' => $obj->source_id,
|
||||||
'__EMAIL__' => $obj->email,
|
'__EMAIL__' => $obj->email,
|
||||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>',
|
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||||
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||||
|
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
||||||
'__LASTNAME__' => $obj->lastname,
|
'__LASTNAME__' => $obj->lastname,
|
||||||
'__FIRSTNAME__' => $obj->firstname,
|
'__FIRSTNAME__' => $obj->firstname,
|
||||||
'__OTHER1__' => $other1,
|
'__OTHER1__' => $other1,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user