Multiple slternative Emails & the CC Problem

Moderator: crythias

Locked
Awtzu
Znuny newbie
Posts: 5
Joined: 11 Dec 2014, 13:40
Znuny Version: 2.4.7

Multiple slternative Emails & the CC Problem

Post by Awtzu »

Hello dear Reader.


I have otrs 3.3.10 installed with the KIX4OTRS addon/plugin.

At the moment my System is setup to assign a ticket to a Customer even if he sent the ticket with a secondary email (alternative email)
I did this with a few lines in the Ldap.pm in KIX4OTRS/Kernel/System/CustomerUser/Ldap.pm:

Code: Select all

my $meinemail = $Param{PostMasterSearch};
[...]
elsif ( $Param{PostMasterSearch} ) {

        if ( $Self->{CustomerUserMap}->{CustomerUserPostMasterSearchFields} ) {
            $Filter = '(|';
            for my $Field ( @{ $Self->{CustomerUserMap}->{CustomerUserPostMasterSearchFields} } ) {
            
            ## REPLACED BY Me  $Filter .= "($Field=$Param{PostMasterSearch})";
            
                if ( $Field eq "mail" || $Field eq "mailAlternateAddress" ) {
                    $meinemail =~ s/\@subdomain\.part\-domain\.com$/\@part\-domain\.com/;
                }
                
             ##END REPLACE
             
                $Filter.= "($Field=$mymail)";
	    }
            $Filter .= ')';
        }
    }
In the Config I added the mailequivalent Variable to the CustomerUser Map

My Problem is firstly: The Field in Ldap is an array and otrs is only reading the first entry.
and: if I send from a secondary/third email wich is an alias of my primary one, it adds the primary email into the cc field.

I'm not sure if I explained myself very good. i'm sorry. If you can help I will try to explain it better if you don't understand.
I'm trying to to something like this but with multiple emails as alternative emails: https://www.mail-archive.com/otrs@otrs. ... 31378.html


thanks for reading
regards
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Multiple slternative Emails & the CC Problem

Post by crythias »

Please read my Need Help? link in my signature. If you need something answered, ask a question.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Awtzu
Znuny newbie
Posts: 5
Joined: 11 Dec 2014, 13:40
Znuny Version: 2.4.7

Re: Multiple slternative Emails & the CC Problem

Post by Awtzu »

Ok.

How do I read Multiple Value Fields from LDAP?
I only get the first Value
Awtzu
Znuny newbie
Posts: 5
Joined: 11 Dec 2014, 13:40
Znuny Version: 2.4.7

Re: Multiple slternative Emails & the CC Problem

Post by Awtzu »

Hey I solved ,my Problem:

In the Config you have to put instead of "var" "ArrayJoin[,]"

The Comma: ( ",") is the seperator and the ArrayJoin is the Var Type I needed for multiple Values.
Locked