Hello all I found it this snippet of code will do what I want.
my $Transaction = $self->TransactionObj;
my $EmailAddr = $self->TransactionObj->CreatorObj->EmailAddress;
my @People = ($EmailAddr);
foreach my $h (qw(From To Cc)) {
my $header = $Transaction->Attachments->First->GetHeader($h);
my @addr = Mail::Address->parse($header);
foreach my $addrobj (@addr) {
my $addr = lc
$RT::Nobody->UserObj->CanonicalizeEmailAddress($addrobj->address);
print "address $addr $h\n";
push @People, $addr;
}
}
Thanks for the ideas and the direction to go. Keep in mind some time it's not
the right answer that help someone out, but gives them direction were to look.
Maybe this thread will help someone else.
Again thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726 * 262-783-6261 ext. 2296
[email protected]<mailto:[email protected]>
www.copesan.com<http://www.copesan.com/>
"Servicing North America with Local Care"
From: [email protected]
[mailto:[email protected]] On Behalf Of Bryon Baker
Sent: Thursday, January 30, 2014 11:29 AM
To: RT Users ([email protected])
Subject: Re: [rt-users] Trying to retrive CC address
Thanks for the fast response Kenn. But that code in the document does not seem
to get me what I want.
With the ticket header below I am trying to retrieve the CC: line from the
email.
Tue, Sep 17, 2013 4:47:02 PMEdwina Hamm \(Facilities\)
<[email protected]><http://testhelpdesk.copesan.com/rt/User/Summary.html?id=1157>
- Ticket created
I want This ------->>> CC:
"Store 0546" <[email protected]<mailto:[email protected]>>
Subject:
CSR- 054609171300 - Work Order For Pest Control
Date:
Tue, 17 Sep 2013 16:43:08 -0500
To:
"Client Service" <[email protected]<mailto:[email protected]>>
From:
"Edwina Hamm \(Facilities\)" <[email protected]<mailto:[email protected]>>
The ticket does not have any group information now does the user.
Again thanks for the help all
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726 * 262-783-6261 ext. 2296
[email protected]<mailto:[email protected]>
www.copesan.com<http://www.copesan.com/>
"Servicing North America with Local Care"
From: Kenneth Crocker [mailto:[email protected]]
Sent: Wednesday, January 29, 2014 5:44 PM
To: Bryon Baker; RT Users
([email protected]<mailto:[email protected]>)
Subject: RE: [rt-users] Trying to retrive CC address
Bryon,
I believe there is an example of that in the book I sent you.
Kenn
Sent from my Windows Phone
________________________________
From: Bryon Baker<mailto:[email protected]>
Sent: 1/29/2014 3:05 PM
To: RT Users
([email protected])<mailto:[email protected]>
Subject: [rt-users] Trying to retrive CC address
Hello all I am trying to retrieve the CC mail address on incoming emails/
I have tried
# my $rcc = $self->TicketObj->CcAddresses;
# my $rcc = $self->TicketObj->Cc->MemberEmailAddresses
And others either I get an error for invalid object or an empty set.
Hope someone can help
Thanks in advance.
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726 * 262-783-6261 ext. 2296
[email protected]<mailto:[email protected]>
www.copesan.com<http://www.copesan.com/>
"Servicing North America with Local Care"