#2705 - Allow emails to support ticket email integration from emails not associated with a member

This is a spacer post for a website comment topic. The content this topic relates to: #2705 - Allow emails to support ticket email integration from emails not associated with a member
It's more complex than this. I started making quick changes then realised...

diff --git a/lang/EN/tickets.ini b/lang/EN/tickets.ini
index dd07f80..4abdf8c 100755
--- a/lang/EN/tickets.ini
+++ b/lang/EN/tickets.ini
@@ -69,7 +69,7 @@ TICKET_SIMPLE_MAIL_new_regexp=Thank you for your message. (A|An) ".*" support ti
TICKET_SIMPLE_MAIL_reply=A reply to your support ticket on {1} has been made. You can reply from the link below (and access any attachments there may be):\n[url="{3}"]{3}[/url]\n\nYou may also reply to this e-mail directly if you prefer.\n\n---------\n\n
TICKET_SIMPLE_MAIL_reply_regexp=A reply to your support ticket on .* has been made\. You can reply from the link below \(and access any attachments there may be\):\n.*\n+You may also reply to this e-mail directly if you prefer\.\n\n---------\n\n
TICKET_CANNOT_BIND_SUBJECT=Re: {1}
-TICKET_CANNOT_BIND_MAIL=Sorry, we did not recognise the e-mail address {2}: we did not know what account to save a support ticket under.\n\nPlease re-send your message from your account's e-mail address, or include your account username in the subject line in square brackets. For example:\n {3} [Example]\n\n----\n\n{1}
+TICKET_CANNOT_BIND_MAIL=Sorry, we did not recognise the e-mail address {2}: we did not know what account to check support ticket access with.\n\nPlease re-send your message from your account's e-mail address, or include your account username in the subject line in square brackets. For example:\n {3} [Example]\n\n----\n\n{1}
SUPPORT_TICKETS_MAIL=Support ticket e-mail integration
TICKET_MAIL_ON=Enable e-mail integration
CONFIG_OPTION_ticket_mail_on=Whether to send out ticket reply e-mails in simple e-mails (rather than notifications), and to integrate an inbox with the ticket system. The PHP IMAP extension is required, a local SMTP server must be running, and the software scheduler must be running (CRON).
diff --git a/sources/tickets_email_integration.php b/sources/tickets_email_integration.php
index 3c3003b..2e9d61e 100644
--- a/sources/tickets_email_integration.php
+++ b/sources/tickets_email_integration.php
@@ -521,9 +521,13 @@ function ticket_incoming_message($from_email, $subject, $body, $attachments)
$member_id = $GLOBALS['FORUM_DRIVER']->get_member_from_email_address($from_email);
if (is_null($member_id)) {
if (is_null($existing_ticket)) {
- // E-mail back, saying user not found
- ticket_email_cannot_bind($subject, $body, $from_email, $from_email_orig);
- return;
+ if ($existing_ticket !== null) {
+ // E-mail back, saying user not found
+ ticket_email_cannot_bind($subject, $body, $from_email, $from_email_orig);
+ return;
+ }
+
+ $member_id = $GLOBALS['FORUM_DRIVER']->get_guest_id();
} else {
$_temp = explode('_', $existing_ticket);
$member_id = intval($_temp[0]);




Complexities:
1) A big part of this is permissions. We need to check the user has access to reply to an existing ticket, because allowing third parties in looks like a scary security hole to anyone using tickets.
2) We need to include the email address of the user in the ticket like we do for normal guest tickets. That would therefore require further changes.
Re-creating more clearly.
0 guests and 0 members have recently viewed this.