Failed to send the email. Please check the logs.
Code
Error #0:
OMV\AssertException: Failed to send the email. Please check the logs. in /usr/share/php/openmediavault/email.inc:77
Stack trace:
#0 /usr/share/openmediavault/engined/rpc/notification.inc(330): OMV\Email->assertSend()
#1 [internal function]: Engined\Rpc\OMVRpcServiceEmailNotification->sendTestEmail(NULL, Array)
#2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('sendTestEmail', NULL, Array)
#4 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('EmailNotificati...', 'sendTestEmail', NULL, Array, 1)
#5 {main}
and when i go to the suggested log
Code
namespace OMV;
/**
* @ingroup api
*/
class Email {
private $from;
private $to;
private $subject;
private $message;
/**
* Constructor.
* @param from The sender email address.
* @param to The receiver email address(es), e.g. 'test@xzy.com' or
* 'xzy@123.org,test@xzy.com'. Use the character , or ; as seperator.
* Additionally this can be an array of email adresses.
* @param subject The subject.
* @param message The message.
*/
public function __construct($from, $to, $subject, $message) {
list($this->from, $this->to, $this->subject,
$this->message) = func_get_args();
// Modify the receiver list.
if (TRUE === is_array($this->to))
$this->$to = implode(',', $this->to);
else
// Prepare the receivers of the email. The formatting of this
// string must comply with RFC 2822.
$this->to = strtr($this->to, [ ';' => ',' ]);
}
/**
* Send the email.
* @return Return TRUE if successful, otherwise FALSE.
*/
public function send() {
// Prepare additional email headers.
$headers = [];
// Set date in RFC 2882 format.
$headers[] = sprintf('Date: %s', date('r'));
// Append the sender address.
if (!empty($this->from))
$headers[] = sprintf('From: %s', $this->from);
return mail($this->to, $this->subject, $this->message,
implode(PHP_EOL, $headers));
}
/**
* Send the email.
* @return void
* @throw \OMV\AssertException
*/
public function assertSend() {
if (FALSE === $this->send()) {
throw new \OMV\AssertException(
"Failed to send the email. Please check the logs.");
}
}
}
Alles anzeigen
I have try different accounts with different ports, clearing the cache with same results. Tis OMV is running on a Raspberry Pi.
Any suggestion would be appreciate it. Thanks!