NAME
CTK::Util - Utilities
VERSION
1.00
$Id: Util.pm 58 2012-12-26 10:45:15Z minus $
SYNOPSIS
my $sent = send_mail(
-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];
DESCRIPTION
no public subroutines
SEE ALSO
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