Permalink
Browse files

Merge pull request #157 from FHenry/develop

Add __MAILTOEMAIL__ and configutation gobal varialbe of Check Read and
  • Loading branch information...
2 parents 8313522 + 2749117 commit 97f4a74ad033c4bfe58bd36ef79864ac88138035 Regis Houssin committed Apr 11, 2012
View
22 htdocs/admin/mailing.php
@@ -44,11 +44,14 @@
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
+ $checkread = GETPOST('value','alpha');
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
+ $res=dolibarr_set_const($db, "MAIN_SOCIETE_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
+ if (! $res > 0) $error++;
if (! $error)
{
@@ -101,6 +104,25 @@
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
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 '</table></form>';
View
6 htdocs/comm/mailing/fiche.php
@@ -49,6 +49,7 @@
'__EMAIL__' => 'EMail',
'__LASTNAME__' => 'Lastname',
'__FIRSTNAME__' => 'Firstname',
+ '__MAILTOEMAIL__' => 'MailtoEmail',
'__OTHER1__' => 'Other1',
'__OTHER2__' => 'Other2',
'__OTHER3__' => 'Other3',
@@ -73,6 +74,7 @@
'__EMAIL__' => 'TESTEMail',
'__LASTNAME__' => 'TESTLastname',
'__FIRSTNAME__' => 'TESTFirstname',
+ '__MAILTOEMAIL__' => 'TESTMailtoEmail',
'__OTHER1__' => 'TESTOther1',
'__OTHER2__' => 'TESTOther2',
'__OTHER3__' => 'TESTOther3',
@@ -208,8 +210,9 @@
$substitutionarray=array(
'__ID__' => $obj->source_id,
'__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>',
+ '__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
'__LASTNAME__' => $obj->nom,
'__FIRSTNAME__' => $obj->prenom,
'__OTHER1__' => $other1,
@@ -1048,6 +1051,7 @@
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
}
+ print '__MAILTOEMAIL__ = '.$langs->trans("MailtoEMail").'<br>';
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';
print '__OTHER1__ = '.$langs->trans("Other").'1<br>';
View
2 htdocs/langs/en_US/mails.lang
@@ -75,6 +75,8 @@ SentTo=Sent to <b>%s</b>
MailingStatusRead=Read
CheckRead=Read Receipt
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
MailingModuleDescContactCompanies=Contacts of all third parties (customer, prospect, supplier, ...)
View
2 htdocs/langs/fr_FR/mails.lang
@@ -75,6 +75,8 @@ SentTo=Envoyés à <b>%s</b>
MailingStatusRead=Lu
CheckRead=Accusé de lecture
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
MailingModuleDescContactCompanies=Contacts de tiers (prospects, clients, fournisseurs...)
View
3 scripts/emailings/mailing-send.php
@@ -139,8 +139,9 @@
$substitutionarray=array(
'__ID__' => $obj->source_id,
'__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>',
+ '__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
'__LASTNAME__' => $obj->lastname,
'__FIRSTNAME__' => $obj->firstname,
'__OTHER1__' => $other1,

0 comments on commit 97f4a74

Please sign in to comment.