RT 4.0.25 Documentation

This version has reached its end of life and is out of support. Please contact us for upgrade assistance.


Go to latest version →


RT::Action::RecordCorrespondence - An Action which can be used from an external tool, or in any situation where a ticket transaction has not been started, to create a correspondence on the ticket.


my $action_obj = RT::Action::RecordCorrespondence->new( 'TicketObj' => $ticket_obj, 'TemplateObj' => $template_obj, ); my $result = $action_obj->Prepare(); $action_obj->Commit() if $result;



Check for the existence of a Transaction. If a Transaction already exists, and is of type "Comment" or "Correspond", abort because that will give us a loop.


Create a Transaction by calling the ticket's Correspond method on our parsed Template, which may have an RT-Send-Cc or RT-Send-Bcc header. The Transaction will be of type Correspond. This Transaction can then be used by the scrips that actually send the email.

← Back to index