diff --git a/lib/Cleantalk/ApbctWP/ConnectionReports.php b/lib/Cleantalk/ApbctWP/ConnectionReports.php
index dc8348003..d344bf3f3 100644
--- a/lib/Cleantalk/ApbctWP/ConnectionReports.php
+++ b/lib/Cleantalk/ApbctWP/ConnectionReports.php
@@ -422,8 +422,6 @@ public function handleRequest(
*/
private function sendEmail(array $unsent_reports_ids, $is_cron_task = false)
{
- global $apbct;
-
$selection = $this->getReportsDataByIds($unsent_reports_ids);
if (empty($selection)) {
@@ -431,7 +429,7 @@ private function sendEmail(array $unsent_reports_ids, $is_cron_task = false)
}
$to = 'pluginreports@cleantalk.org';
- $subject = "Connection report for " . TT::toString(Server::get('HTTP_HOST')) . " v" . APBCT_VERSION;
+ $subject = "CleanTalk Service Report: Connection v" . APBCT_VERSION . " for " . Server::getString('HTTP_HOST') ;
$message = $this->prepareEmailContent($selection, $is_cron_task);
$headers = "Content-type: text/html; charset=utf-8 \r\n";
@@ -451,6 +449,7 @@ private function sendEmail(array $unsent_reports_ids, $is_cron_task = false)
*/
private function prepareEmailContent(array $selection, $is_cron_task = false)
{
+ global $apbct;
$stat_since = isset($this->reports_count['stat_since']) ? $this->reports_count['stat_since'] : '';
$total = isset($this->reports_count['total']) ? $this->reports_count['total'] : '';
$positive = isset($this->reports_count['positive']) ? $this->reports_count['positive'] : '';
@@ -489,6 +488,7 @@ private function prepareEmailContent(array $selection, $is_cron_task = false)
$message .= '
';
$message .= '
' . ($is_cron_task ? 'This is a cron task.' : 'This is a manual task.') . '
';
+ $message .= '
Site service_id: ' . $apbct->data['service_id'] . '
';
$message .= '