Piotr Labudda пре 10 година
родитељ
комит
a42f15db59
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      SE/se-lib/Route/Notify.php

+ 6 - 2
SE/se-lib/Route/Notify.php

@@ -204,7 +204,7 @@ function refreshPreview() {
 			if (!empty($listWhat)) {
 				$reminders = array_keys($listWhat);
 				echo "<p>Sending to {$who} reminders [" . implode(",", $reminders) . "] at '{$when}'</p>" . "\n";
-				$this->send($who, $listWhat, $when, $forceMail = 'plabudda@biall-net.pl');
+				$this->send($who, $listWhat, $when, $forceMail);
 				$this->markAsSent($who, $listWhat, $when);
 			}
 		}
@@ -254,7 +254,11 @@ function refreshPreview() {
 		}
 		$message = ob_get_clean();
 
-		if (!mail($to, $subject, $message, $headers)) throw new Exception("Nie udało się wysłać powiadomienia");
+		trigger_error("send msg to {$to} ({$usrLogin}) when='{$when}'", E_USER_NOTICE);
+		if (!mail($to, $subject, $message, $headers)) {
+			trigger_error("Cannot send msg to {$to} ({$usrLogin}) when='{$when}'", E_USER_WARNING);
+			throw new Exception("Nie udało się wysłać powiadomienia");
+		}
 	}
 
 	public function getUserMainMail($usrLogin) {