summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2003-07-16 16:15:29 +0000
committercvs2git <cvs2git>2003-07-16 16:15:29 +0000
commit670f3524173a66d153585c830ed278b033f8be7b (patch)
tree52b89f8ac272ed2bf0655987350c79ed35334fe4
parent9b2e5b1e3388ed102a9aee13893c88b1b2200f8c (diff)
This commit was manufactured by cvs2svn to create tag 'freeside_1_4_1rc5'.freeside_1_4_1rc5
-rw-r--r--FS/FS/Misc.pm102
-rw-r--r--FS/t/Misc.t5
-rw-r--r--httemplate/docs/man/FS/part_export/.cvs_is_on_crack0
3 files changed, 0 insertions, 107 deletions
diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm
deleted file mode 100644
index efad2df..0000000
--- a/FS/FS/Misc.pm
+++ /dev/null
@@ -1,102 +0,0 @@
-package FS::Misc;
-
-use strict;
-use vars qw ( @ISA @EXPORT_OK );
-use Exporter;
-
-@ISA = qw( Exporter );
-@EXPORT_OK = qw( send_email );
-
-=head1 NAME
-
-FS::Misc - Miscellaneous subroutines
-
-=head1 SYNOPSIS
-
- use FS::Misc qw(send_email);
-
- send_email();
-
-=head1 DESCRIPTION
-
-Miscellaneous subroutines. This module contains miscellaneous subroutines
-called from multiple other modules. These are not OO or necessarily related,
-but are collected here to elimiate code duplication.
-
-=head1 SUBROUTINES
-
-=over 4
-
-=item send_email OPTION => VALUE ...
-
-Options:
-
-I<from> - (required)
-
-I<to> - (required) comma-separated scalar or arrayref of recipients
-
-I<subject> - (required)
-
-I<content-type> - (optional) MIME type
-
-I<body> - (required) arrayref of body text lines
-
-=cut
-
-use vars qw( $conf );
-use Date::Format;
-use Mail::Header;
-use Mail::Internet 1.44;
-use FS::UID;
-
-FS::UID->install_callback( sub {
- $conf = new FS::Conf;
-} );
-
-sub send_email {
- my(%options) = @_;
-
- $ENV{MAILADDRESS} = $options{'from'};
- my $to = ref($options{to}) ? join(', ', @{ $options{to} } ) : $options{to};
- my @header = (
- 'From: '. $options{'from'},
- 'To: '. $to,
- 'Sender: '. $options{'from'},
- 'Reply-To: '. $options{'from'},
- 'Date: '. time2str("%a, %d %b %Y %X %z", time),
- 'Subject: '. $options{'subject'},
- );
- push @header, 'Content-Type: '. $options{'content-type'}
- if exists($options{'content-type'});
- my $header = new Mail::Header ( \@header );
-
- my $message = new Mail::Internet (
- 'Header' => $header,
- 'Body' => $options{'body'},
- );
-
- my $smtpmachine = $conf->config('smtpmachine');
- $!=0;
-
- my $rv = $message->smtpsend( 'Host' => $smtpmachine )
- or $message->smtpsend( Host => $smtpmachine, Debug => 1 );
-
- if ($rv) { #smtpsend returns a list of addresses, not true/false
- return '';
- } else {
- return "can't send email to $to via server $smtpmachine with SMTP: $!";
- }
-
-}
-
-=head1 BUGS
-
-This package exists.
-
-=head1 SEE ALSO
-
-L<FS::UID>, L<FS::CGI>, L<FS::Record>, the base documentation.
-
-=cut
-
-1;
diff --git a/FS/t/Misc.t b/FS/t/Misc.t
deleted file mode 100644
index cc7751a..0000000
--- a/FS/t/Misc.t
+++ /dev/null
@@ -1,5 +0,0 @@
-BEGIN { $| = 1; print "1..1\n" }
-END {print "not ok 1\n" unless $loaded;}
-use FS::Misc;
-$loaded=1;
-print "ok 1\n";
diff --git a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack b/httemplate/docs/man/FS/part_export/.cvs_is_on_crack
deleted file mode 100644
index e69de29..0000000
--- a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack
+++ /dev/null