public function Send() { error_log('JMailLogger: Send() called'); // Log before sending $this->logEmailAttempt(); // Call parent Send() method try { $result = parent::Send(); error_log('JMailLogger: Send() result: ' . ($result ? 'success' : 'failed')); $this->logEmailResult($result); return $result; } catch (Exception $e) { error_log('JMailLogger: Send() error: ' . $e->getMessage()); $this->logEmailError($e); return false; } }