mirror of https://github.com/MISP/MISP
fix: [internal] return true from the external email sender if no mocking is happening instead of the full email
parent
db3ac8acc5
commit
8418e8ee57
|
@ -777,11 +777,16 @@ class User extends AppModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$Email->attachments($attachments);
|
$Email->attachments($attachments);
|
||||||
|
$mock = false;
|
||||||
if (Configure::read('MISP.disable_emailing') || !empty($params['mock'])) {
|
if (Configure::read('MISP.disable_emailing') || !empty($params['mock'])) {
|
||||||
$Email->transport('Debug');
|
$Email->transport('Debug');
|
||||||
|
$mock = true;
|
||||||
}
|
}
|
||||||
$result = $Email->send($params['body']);
|
$result = $Email->send($params['body']);
|
||||||
$Email->reset();
|
$Email->reset();
|
||||||
|
if ($result && !$mock) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue