Skip to content
Snippets Groups Projects
Commit 5c78747f authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #6955 save email draft even if there is no subject or no recipient

parent ed3b97f5
No related branches found
No related tags found
No related merge requests found
...@@ -194,13 +194,14 @@ switch ($mode) { ...@@ -194,13 +194,14 @@ switch ($mode) {
$error = $request->wash_html(_INCORRECT_SENDER,'NONE'); $error = $request->wash_html(_INCORRECT_SENDER,'NONE');
$status = 1; $status = 1;
} else { } else {
if (isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0 ) { if ((isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0) || $_REQUEST['for'] == 'save') {
if (!empty($_REQUEST['object'])) { if (!empty($_REQUEST['object']) || $_REQUEST['for'] == 'save') {
// print_r($_REQUEST);exit;
//Check adress for to //Check adress for to
$to = join(',', $_SESSION['adresses']['to']); if(!empty($_SESSION['adresses']['to'])){
$error = $sendmail_tools->CheckEmailAdress($to); $to = join(',', $_SESSION['adresses']['to']);
$error = $sendmail_tools->CheckEmailAdress($to);
}
if (empty($error)) { if (empty($error)) {
...@@ -334,13 +335,14 @@ switch ($mode) { ...@@ -334,13 +335,14 @@ switch ($mode) {
$error = $request->wash_html(_INCORRECT_SENDER,'NONE'); $error = $request->wash_html(_INCORRECT_SENDER,'NONE');
$status = 1; $status = 1;
} else { } else {
if (isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0 ) { if ((isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0) || $_REQUEST['for'] == 'save') {
if (!empty($_REQUEST['object'])) { if (!empty($_REQUEST['object']) || $_REQUEST['for'] == 'save') {
// print_r($_REQUEST);exit;
//Check adress for to //Check adress for to
$to = join(',', $_SESSION['adresses']['to']); if(!empty($_SESSION['adresses']['to'])){
$error = $sendmail_tools->CheckEmailAdress($to); $to = join(',', $_SESSION['adresses']['to']);
$error = $sendmail_tools->CheckEmailAdress($to);
}
if (empty($error)) { if (empty($error)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment