<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div class="" style=""><span class="" style=""><span style="font-family: Verdana, Arial, Helvetica; font-size: 13px;" class="">ok thanks.</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: Verdana, Arial, Helvetica; background-color: transparent; font-style: normal;"><span class="" style=""><span style="font-family: Verdana, Arial, Helvetica; font-size: 13px;" class="">in perl:</span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13px; font-family: Verdana, Arial, Helvetica; background-color: transparent; font-style: normal;"><span class="" style=""><span style="font-family: Verdana, Arial, Helvetica; font-size: 13px;" class="">comment in ticket in create but Without attach... </span></span></div><div class=""
 style="background-color: transparent;"><span class="" style=""><font face="Verdana, Arial, Helvetica" size="2" class="" style="">What to Do?</font><br style="font-family: Verdana, Arial, Helvetica; font-size: 13px;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><font color="#000000" style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""></font><font color="#007777" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">#!/usr/bin/perl <br class="" style=""></font><font color="#660066" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class=""># <br class="" style=""># comment_on_ticket.pl -- add comment to an RT ticket. <br class="" style=""></font><span style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""></span><br style="font-family:
 Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use strict; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use warnings; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use RT::Client::REST::Ticket; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use Error qw(:try); </span><br style="font-family: Verdana, Arial, Helvetica; font-size:
 small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use RT::Client::REST; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use RT::Client::REST::Ticket; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use MIME::Entity; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use MIME::Lite; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br
 style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">unless (@ARGV >= 4) { </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">die "Usage: $0 username password ticket_id comment\n"; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">} </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br
 style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">my $rt = RT::Client::REST->new( </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">server => ($ENV{RTSERVER} || '</span><a href="http://192.168.1.201/rt'" rel="nofollow" target="_blank" style="color: rgb(85, 26, 139); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal; background-color: rgb(255, 255, 255);" class="">http://192.168.1.201/rt'</a><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">), </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span
 style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">); </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">$rt->login( </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">username=> shift(@ARGV), </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">password=> shift(@ARGV), </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family:
 Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">); </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">my $attachments_1 = MIME::Lite->new(Type =>'application/octet-stream'); </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">$attachments_1->attach(Type => 'application/octet-stream', </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">Path =>
 '/pasokh.gsm', </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">Filename => 'pasokh.gsm', </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">Disposition => 'attachment' </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">); </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica;
 font-size: small; font-style: normal;" class="">my $ticket = RT::Client::REST::Ticket->new( </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">rt => $rt, </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">id => shift(@ARGV), </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">); </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family:
 Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">try { </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">$ticket->comment( </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">message => shift(@ARGV), </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">cc => [qw(info [at] pionfirm)], </span><br style="font-family: Verdana, Arial,
 Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">attachments_1 => $attachments_1 </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">); </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">} </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small;
 font-style: normal;" class="">catch Exception::Class::Base with { </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">my $e = shift; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">die ref($e), ": ", $e->message || $e->description, "\n"; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">}; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span
 style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: small; font-style: normal;" class="">use Data::Dumper; </span><br style="font-family: Verdana, Arial, Helvetica; font-size: small;" class=""><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica; font-size: 13px; font-style: normal;" class="">print Dumper($ticket);</span><br class="" style=""></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div dir="ltr" class="" style=""> <font size="2" face="Arial" class="" style=""> On Wednesday, November 5, 2014 10:01 PM, Shahab Sharifzadeh <sshguard@ymail.com> wrote:<br class="" style=""> </font>
 </div>  <br class="" style=""><br class="" style=""> <div class="" style="">very thankssss...<br clear="none" class="" style=""><br clear="none" class="" style="">nobody help me?<div class="" id="yqtfd89943" style=""><br clear="none" class="" style=""> <br clear="none" class="" style=""></div><br class="" style=""><br class="" style=""></div>  </div> </div>  </div> </div></body></html>