Message erreur plus detaill sur fonction test mailing
This commit is contained in:
parent
736dca48c5
commit
7b94bf75d7
@ -63,6 +63,18 @@ if ($_POST["action"] == 'send')
|
||||
$mil->sujet = $_POST["subject"];
|
||||
$mil->body = $_POST["message"];
|
||||
|
||||
if (! $mil->sendto)
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'</div>';
|
||||
}
|
||||
if (! $mil->sujet)
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTopic")).'</div>';
|
||||
}
|
||||
if (! $mil->body)
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("MailMessage")).'</div>';
|
||||
}
|
||||
if ($mil->sendto && $mil->sujet && $mil->body)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
@ -96,11 +108,6 @@ if ($_POST["action"] == 'send')
|
||||
$_GET["action"]='';
|
||||
$_GET["id"]=$mil->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("ErrorUnknown").'</div>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Action ajout mailing
|
||||
|
||||
@ -43,5 +43,5 @@ $target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n')
|
||||
***** STEP 3 *****
|
||||
|
||||
Once this file has been edited, you can go to the Dolibarr emailing feature,
|
||||
you will see a new line selector in the "target" editor of emailings.
|
||||
you will see a new line selector in the "targets" editor of emailing tool.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user