|
@@ -105,6 +105,39 @@ Some Text"
|
|
|
Scheduler.worker(true)
|
|
|
assert_equal(1, article_p.ticket.articles.count)
|
|
|
|
|
|
+ email_raw_string = "From: me@example.com
|
|
|
+To: customer@example.com
|
|
|
+Subject: some new subject
|
|
|
+List-Unsubscribe: <mailto:somebody@example.com>
|
|
|
+
|
|
|
+Some Text"
|
|
|
+
|
|
|
+ fqdn = Setting.get('fqdn')
|
|
|
+ email_raw_string = "From: me@example.com
|
|
|
+To: customer@example.com
|
|
|
+Subject: some new subject
|
|
|
+Message-ID: <1234@#{fqdn}>
|
|
|
+
|
|
|
+Some Text"
|
|
|
+
|
|
|
+ ticket_p, article_p, user_p, mail = Channel::EmailParser.new.process({}, email_raw_string)
|
|
|
+ assert_equal(false, mail['x-zammad-send-auto-response'.to_sym])
|
|
|
+ Scheduler.worker(true)
|
|
|
+ assert_equal(1, article_p.ticket.articles.count)
|
|
|
+
|
|
|
+ fqdn = Setting.get('fqdn')
|
|
|
+ email_raw_string = "From: me@example.com
|
|
|
+To: customer@example.com
|
|
|
+Subject: some new subject
|
|
|
+Message-ID: <1234@not_matching.#{fqdn}>
|
|
|
+
|
|
|
+Some Text"
|
|
|
+
|
|
|
+ ticket_p, article_p, user_p, mail = Channel::EmailParser.new.process({}, email_raw_string)
|
|
|
+ assert_equal(true, mail['x-zammad-send-auto-response'.to_sym])
|
|
|
+ Scheduler.worker(true)
|
|
|
+ assert_equal(2, article_p.ticket.articles.count)
|
|
|
+
|
|
|
email_raw_string = "Return-Path: <XX@XX.XX>
|
|
|
X-Original-To: sales@znuny.com
|
|
|
Received: from mail-qk0-f170.example.com (mail-qk0-f170.example.com [209.1.1.1])
|