[rt-users] Trying to retrive CC address
Bryon Baker
bbaker at copesan.com
Thu Jan 30 12:43:32 EST 2014
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
bbaker at copesan.com<mailto:cstephan at copesan.com>
www.copesan.com<http://www.copesan.com/>
"Servicing North America with Local Care"
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Bryon Baker
Sent: Thursday, January 30, 2014 11:29 AM
To: RT Users (rt-users at lists.bestpractical.com)
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\) <EDWINA.HAMM at ros.com><http://testhelpdesk.copesan.com/rt/User/Summary.html?id=1157> - Ticket created
I want This ------->>> CC:
"Store 0546" <Store.0546 at ros.com<mailto:Store.0546 at ros.com>>
Subject:
CSR- 054609171300 - Work Order For Pest Control
Date:
Tue, 17 Sep 2013 16:43:08 -0500
To:
"Client Service" <clientservice at copesan.com<mailto:clientservice at copesan.com>>
From:
"Edwina Hamm \(Facilities\)" <EDWINA.HAMM at ros.com<mailto:EDWINA.HAMM at ros.com>>
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
bbaker at copesan.com<mailto:cstephan at copesan.com>
www.copesan.com<http://www.copesan.com/>
"Servicing North America with Local Care"
From: Kenneth Crocker [mailto:kenn.crocker at gmail.com]
Sent: Wednesday, January 29, 2014 5:44 PM
To: Bryon Baker; RT Users (rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>)
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:bbaker at copesan.com>
Sent: 1/29/2014 3:05 PM
To: RT Users (rt-users at lists.bestpractical.com)<mailto:rt-users at lists.bestpractical.com>
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
bbaker at copesan.com<mailto:cstephan at copesan.com>
www.copesan.com<http://www.copesan.com/>
"Servicing North America with Local Care"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140130/ac150996/attachment.htm>
More information about the rt-users
mailing list