<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.date
{mso-style-name:date;}
span.description1
{mso-style-name:description1;}
span.actions
{mso-style-name:actions;}
span.user
{mso-style-name:user;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hello all I found it this snippet of code will do what I want.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> my $Transaction = $self->TransactionObj;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> my $EmailAddr = $self->TransactionObj->CreatorObj->EmailAddress;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> my @People = ($EmailAddr);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> foreach my $h (qw(From To Cc)) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> my $header = $Transaction->Attachments->First->GetHeader($h);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> my @addr = Mail::Address->parse($header);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> foreach my $addrobj (@addr) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> my $addr = lc $RT::Nobody->UserObj->CanonicalizeEmailAddress($addrobj->address);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> print "address $addr $h\n";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> push @People, $addr;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Maybe this thread will help someone else.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Again thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Bryon Baker<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Network Operations Manager<o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">Copesan</span></i></b><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"> - Specialists in Pest Solutions<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">800-267-3726 • 262-783-6261 ext. 2296<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><a href="mailto:cstephan@copesan.com">bbaker@copesan.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><a href="http://www.copesan.com/"><span style="color:black">www.copesan.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">"Servicing North America with Local Care"</span></i></b><span style="color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com]
<b>On Behalf Of </b>Bryon Baker<br>
<b>Sent:</b> Thursday, January 30, 2014 11:29 AM<br>
<b>To:</b> RT Users (rt-users@lists.bestpractical.com)<br>
<b>Subject:</b> Re: [rt-users] Trying to retrive CC address<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="background:white"><span class="date"><span lang="EN" style="color:#4F81BD">Thanks for the fast response Kenn. But that code in the document does not seem to get me what I want.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="background:white"><span class="date"><span lang="EN" style="color:#4F81BD">With the ticket header below I am trying to retrieve the CC: line from the email.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="background:white"><span class="date"><span lang="EN" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="background:white"><span class="date"><span lang="EN" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Tue, Sep 17, 2013 4:47:02 PM</span></span><span class="user"><span lang="EN" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><a href="http://testhelpdesk.copesan.com/rt/User/Summary.html?id=1157">Edwina
Hamm \(Facilities\) <EDWINA.HAMM@ros.com></a></span></span><span class="description1"><span lang="EN" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"> - Ticket created
</span></span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#4F81BD">I want This
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">-----</span><span style="font-size:10.0pt;font-family:Wingdings;color:black">à</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">>> CC:</span><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">"Store 0546" <<a href="mailto:Store.0546@ros.com">Store.0546@ros.com</a>></span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" align="right" style="text-align:right"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Subject:</span><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">CSR- 054609171300 - Work Order For Pest Control</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" align="right" style="text-align:right"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Date:</span><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Tue, 17 Sep 2013 16:43:08 -0500</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" align="right" style="text-align:right"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">To:</span><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">"Client Service" <<a href="mailto:clientservice@copesan.com">clientservice@copesan.com</a>></span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" align="right" style="text-align:right"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">From:</span><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">"Edwina Hamm \(Facilities\)" <<a href="mailto:EDWINA.HAMM@ros.com">EDWINA.HAMM@ros.com</a>></span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">The ticket does not have any </span>
<span style="color:#0070C0">group</span><span style="color:#1F497D"> information now does the user.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Again thanks for the help all</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Bryon Baker</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Network Operations Manager</span><o:p></o:p></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">Copesan</span></i></b><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"> - Specialists in Pest Solutions</span></i></b><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">800-267-3726 • 262-783-6261 ext. 2296</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><a href="mailto:cstephan@copesan.com">bbaker@copesan.com</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><a href="http://www.copesan.com/"><span style="color:black">www.copesan.com</span></a></span><o:p></o:p></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">"Servicing North America with Local Care"</span></i></b><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Kenneth Crocker [<a href="mailto:kenn.crocker@gmail.com">mailto:kenn.crocker@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, January 29, 2014 5:44 PM<br>
<b>To:</b> Bryon Baker; RT Users (<a href="mailto:rt-users@lists.bestpractical.com">rt-users@lists.bestpractical.com</a>)<br>
<b>Subject:</b> RE: [rt-users] Trying to retrive CC address</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Bryon,<br>
<br>
I believe there is an example of that in the book I sent you.<br>
<br>
Kenn<br>
<br>
Sent from my Windows Phone<o:p></o:p></p>
</div>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b>From: </b><a href="mailto:bbaker@copesan.com">Bryon Baker</a><br>
<b>Sent: </b>1/29/2014 3:05 PM<br>
<b>To: </b><a href="mailto:rt-users@lists.bestpractical.com">RT Users (rt-users@lists.bestpractical.com)</a><br>
<b>Subject: </b>[rt-users] Trying to retrive CC address<o:p></o:p></p>
</div>
<p class="MsoNormal">Hello all I am trying to retrieve the CC mail address on incoming emails/<o:p></o:p></p>
<p class="MsoNormal">I have tried<o:p></o:p></p>
<p class="MsoNormal"># my $rcc = $self->TicketObj->CcAddresses;<o:p></o:p></p>
<p class="MsoNormal"># my $rcc = $self->TicketObj->Cc->MemberEmailAddresses<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">And others either I get an error for invalid object or an empty set.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Hope someone can help<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks in advance.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Bryon Baker</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Network Operations Manager</span><o:p></o:p></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">Copesan</span></i></b><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"> - Specialists in Pest Solutions</span></i></b><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">800-267-3726 • 262-783-6261 ext. 2296</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><a href="mailto:cstephan@copesan.com">bbaker@copesan.com</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><a href="http://www.copesan.com/"><span style="color:black">www.copesan.com</span></a></span><o:p></o:p></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">"Servicing North America with Local Care"</span></i></b><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</body>
</html>