Merge branch 'marcosgdf-delay-emailing' into develop
This commit is contained in:
commit
59ef42cd52
@ -12,6 +12,7 @@ For users:
|
|||||||
MARGIN_PMP_AS_DEFAULT_BUY_PRICE to replace with first supplier price.
|
MARGIN_PMP_AS_DEFAULT_BUY_PRICE to replace with first supplier price.
|
||||||
- Introduce option MAIN_HTML_TITLE to start to control format of html title content.
|
- Introduce option MAIN_HTML_TITLE to start to control format of html title content.
|
||||||
- Add extrafields on bank account cards.
|
- Add extrafields on bank account cards.
|
||||||
|
- Added delay between mails in Newsletter module
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|||||||
@ -48,11 +48,14 @@ if ($action == 'setvalue')
|
|||||||
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
||||||
$checkread = GETPOST('value','alpha');
|
$checkread = GETPOST('value','alpha');
|
||||||
$checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY','alpha');
|
$checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY','alpha');
|
||||||
|
$mailingdelay = GETPOST('MAILING_DELAY', 'int');
|
||||||
|
|
||||||
$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, "MAILING_DELAY",$mailingdelay,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
// Create temporary encryption key if nedded
|
// Create temporary encryption key if nedded
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
||||||
@ -124,6 +127,12 @@ 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("MailingDelay").'</td><td>';
|
||||||
|
print '<input size="32" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Constant to add salt into the unsubscribe and check read tag.
|
// Constant to add salt into the unsubscribe and check read tag.
|
||||||
// It is also used as a security key parameter.
|
// It is also used as a security key parameter.
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -325,6 +325,10 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($conf->global->MAILING_DELAY))
|
||||||
|
{
|
||||||
|
sleep($conf->global->MAILING_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
//test if CHECK READ change statut prospect contact
|
//test if CHECK READ change statut prospect contact
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1393,6 +1393,7 @@ RSSUrlExample=An interesting RSS feed
|
|||||||
MailingSetup=EMailing module setup
|
MailingSetup=EMailing module setup
|
||||||
MailingEMailFrom=Sender EMail (From) for emails sent by emailing module
|
MailingEMailFrom=Sender EMail (From) for emails sent by emailing module
|
||||||
MailingEMailError=Return EMail (Errors-to) for emails with errors
|
MailingEMailError=Return EMail (Errors-to) for emails with errors
|
||||||
|
MailingDelay=Seconds to wait after sending next message
|
||||||
##### Notification #####
|
##### Notification #####
|
||||||
NotificationSetup=EMail notification module setup
|
NotificationSetup=EMail notification module setup
|
||||||
NotificationEMailFrom=Sender EMail (From) for emails sent for notifications
|
NotificationEMailFrom=Sender EMail (From) for emails sent for notifications
|
||||||
|
|||||||
@ -245,6 +245,11 @@ if ($resql)
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($conf->global->MAILING_DELAY)) {
|
||||||
|
sleep($conf->global->MAILING_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user