NAME
CTK::Util - CTK Utilities
VERSION
Version 1.00
REVISION
$Revision: 78 $
SYNOPSIS
use CTK;
my $c = new CTK;
my @ls = CTK::ls(".");
DESCRIPTION
no public subroutines
SENDMAIL
my $sent = sendmail(
-to => 'to@example.com',
-cc => 'cc@example.com', ### OPTIONAL
-from => 'from@example.com',
-subject => 'my subject',
-message => 'my message',
-type => 'text/plain',
-sendmail => '/usr/sbin/sendmail', ### OPTIONAL
-charset => 'windows-1251',
-flags => '-t', ### OPTIONAL
-smtp => '192.168.1.1', ### OPTIONAL
-authuser => '', ### OPTIONAL
-authpass => '', ### OPTIONAL
-attach => [ ### OPTIONAL
{
Type=>'text/plain',
Data=>'document 1 content',
Filename=>'doc1.txt',
Disposition=>'attachment',
},
{
Type=>'text/plain',
Data=>'document 2 content',
Filename=>'doc2.txt',
Disposition=>'attachment',
},
{
Type=>'text/html',
Data=>'blah-blah-blah',
Filename=>'response.htm',
Disposition=>'attachment',
},
{
Type=>'image/gif',
Path=>'aaa000123.gif',
Filename=>'logo.gif',
Disposition=>'attachment',
},
### ... ###
],
);
debug($sent ? 'mail has been sent :)' : 'mail was not sent :(');
GENERAL API
my @args = @_;
my ($content, $maxcnt, $timeout, $timedie, $base, $login, $password, $host, $table_tmp);
($content, $maxcnt, $timeout, $timedie, $base, $login, $password, $host, $table_tmp) =
read_attributes([
['DATA','CONTENT','USERDATA'],
['COUNT','MAXCOUNT','MAXCNT'],
['TIMEOUT','FORBIDDEN','INTERVAL'],
['TIMEDIE','TIME'],
['BD','DB','BASE','DATABASE'],
['LOGIN','USER'],
['PASSWORD','PASS'],
['HOST','HOSTNAME','ADDRESS','ADDR'],
['TABLE','TABLENAME','NAME','SESSION','SESSIONNAME']
],@args) if defined $args[0];
SEE ALSO
MIME::Lite, CGI::Util, Time::Local, Net::FTP, IPC::Open3
AUTHOR
Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>
COPYRIGHT
Copyright (C) 1998-2012 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms and conditions as Perl itself.
This program is distributed under the GNU LGPL v3 (GNU Lesser General Public License version 3).
See LICENSE
file