<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I send emails from a system I use to customers with a BCC to rt.<div>After arriving, the ticket has:</div><div><br></div><div>From: my_email_address</div><div>To: customer_email_address</div><div><br></div><div>Fine, but now I want to exchange these values into:</div><div><br></div><div>From: customer_email_address</div><div>To: my_email_address</div><div><br></div><div>Spent a couple of hours in the mailing list archives and tried several solutions but am still stuck.</div><div><br></div><div>Tried a script (which I found here) with user defined action for cleanup:</div><div><br></div><div><div>my $Transaction = $self->TransactionObj; </div><div>my $header = $Transaction->Attachments->First->GetHeader('To'); </div><div><div>my @addr = Mail::Address->parse($header); </div><div>foreach my $addrobj (@addr) { </div><div>my $addr = lc $RT::Nobody->UserObj->CanonicalizeEmailAddress($addrobj->address); </div><div>$RT::Logger->debug("my value for ToEmailAddress is " . "$addr");</div><div>$self->TicketObj->AddWatcher(Type=>'Requestor', Email => $addr);</div><div>}</div><div>$self->TicketObj->DeleteWatcher(Type=>'Requestor', Email => 'my_email_address');</div><div> </div></div><div>but no log output is produced. I stripped everything away but</div><div><br></div><div><div>my $Transaction = $self->TransactionObj; </div><div>my $header = $Transaction->Attachments->First->GetHeader('To'); </div><div><div>$RT::Logger->debug("debug?" );</div><div><br></div><div>but there is still no log output. Only after commenting the my $header line, I get log output.</div><div><br></div><div>What am I doing wrong? Thanks for any help.</div><div><br></div><div>Regards</div><div>Peter</div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><span class="Apple-style-span" style="font-size: medium;"><br></span></span></font></div></div></div></div><div><div apple-content-edited="true"><br class="Apple-interchange-newline"> </div><br></div></body></html>