|
@@ -801,6 +801,7 @@ if ($action == 'create') {
|
|
|
// MAILING_NO_USING_PHPMAIL may be defined or not.
|
|
|
// MAILING_LIMIT_SENDBYWEB is always defined to something != 0 (-1=forbidden).
|
|
|
// MAILING_LIMIT_SENDBYCLI may be defined ot not (-1=forbidden, 0 or undefined=no limit).
|
|
|
+ // MAILING_LIMIT_SENDBYDAY may be defined ot not (0 or undefined=no limit).
|
|
|
if (!empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail') {
|
|
|
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
|
|
|
// You ensure that every user is using its own SMTP server when using the mass emailing module.
|
|
@@ -836,14 +837,21 @@ if ($action == 'create') {
|
|
|
}
|
|
|
|
|
|
$text = '';
|
|
|
- if (!isset($conf->global->MAILING_LIMIT_SENDBYCLI) || $conf->global->MAILING_LIMIT_SENDBYCLI >= 0) {
|
|
|
- $text .= $langs->trans("MailingNeedCommand");
|
|
|
- $text .= '<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.' '.$user->login.'</textarea>';
|
|
|
+
|
|
|
+ if (isset($conf->global->MAILING_LIMIT_SENDBYDAY) && $conf->global->MAILING_LIMIT_SENDBYDAY >= 0) {
|
|
|
+ $text .= $langs->trans('WarningLimitSendByDay', $conf->global->MAILING_LIMIT_SENDBYDAY);
|
|
|
$text .= '<br><br>';
|
|
|
}
|
|
|
$text .= $langs->trans('ConfirmSendingEmailing').'<br>';
|
|
|
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
|
|
|
- print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('SendMailing'), $text, 'sendallconfirmed', '', '', 1, 330, 600);
|
|
|
+
|
|
|
+ if (!isset($conf->global->MAILING_LIMIT_SENDBYCLI) || $conf->global->MAILING_LIMIT_SENDBYCLI >= 0) {
|
|
|
+ $text .= '<br><br>';
|
|
|
+ $text .= $langs->trans("MailingNeedCommand");
|
|
|
+ $text .= '<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft" disabled>php ./scripts/emailings/mailing-send.php '.$object->id.' '.$user->login.'</textarea>';
|
|
|
+ }
|
|
|
+
|
|
|
+ print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('SendMailing'), $text, 'sendallconfirmed', '', '', 1, 330, 600, 0, $langs->trans("Confirm"), $langs->trans("Cancel"));
|
|
|
}
|
|
|
}
|
|
|
|