diff --git a/cron/ticket_email_parser.php b/cron/ticket_email_parser.php
index 13fca0f2..c80edbc8 100644
--- a/cron/ticket_email_parser.php
+++ b/cron/ticket_email_parser.php
@@ -150,8 +150,10 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
mysqli_query($mysqli, "INSERT INTO ticket_watchers SET watcher_email = '$contact_email_esc', watcher_ticket_id = $id");
}
+ // External email
+ $bad_pattern = "/do[\W_]*not[\W_]*reply|no[\W_]*reply/i";
$data = [];
- if ($config_ticket_client_general_notifications == 1) {
+ if ($config_ticket_client_general_notifications == 1 && !preg_match($bad_pattern, $contact_email)) {
$subject_email = "Ticket created - [$config_ticket_prefix$ticket_number] - $subject";
$body = "##- Please type your reply above this line -##
Hello $contact_name,
Thank you for your email. A ticket regarding \"$subject\" has been automatically created for you.
Ticket: $config_ticket_prefix$ticket_number
Subject: $subject
Status: New
Portal: View ticket
--
$company_name - Support
$config_ticket_from_email
$company_phone";
$data[] = [
@@ -164,6 +166,7 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
];
}
+ // Internal email
if ($config_ticket_new_ticket_notification_email) {
if ($client_id == 0) {
$client_name = "Guest";