MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/doc/perl-MailTools-2.12/examples/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/doc/perl-MailTools-2.12/examples/forwd_demo
#!/usr/bin/perl -w
use Mail::Internet;

@mail = <>;

$mail = Mail::Internet->new(\@mail);

$mail->remove_sig;
$mail->tidy_body;

@reply = ();
if(open(HDR,"$ENV{HOME}/.mailhdr")) {
 @reply = <HDR>;
 close(HDR);
}

$rply = Mail::Internet->new(\@reply);

$subject = $mail->get('Subject');

$rply->replace('To', "");
$rply->replace('Cc', "");
$rply->replace('Subject',$subject);

$rply->body($body = $mail->body);

unshift @{$body},"---------- Begin Included Message ----------\n";
push    @{$body},"----------- End Included Message -----------\n";

$file = "/tmp/reply.$$";

open(FILE,">$file") || die "Cannot open $file:$!\n";

$rply->print(\*FILE);

close(FILE);

$editor = $ENV{"EDITOR"} || "/usr/bin/nvi";

warn "$editor :$!\n" if (system("$editor $file"));

unlink($file,$file . '%');

exit 0;


MMCT - 2023