ispman/bin ispman.domainmail,1.4,1.4.2.1
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28058
Modified Files:
Tag: rel_1_2-bugfixes
ispman.domainmail
Log Message:
this tool could hardly worked at all... ;)
Applied bugfix as suggested from [email protected]
Index: ispman.domainmail
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.domainmail,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- ispman.domainmail 5 Jun 2004 12:45:18 -0000 1.4
+++ ispman.domainmail 8 Feb 2005 21:01:17 -0000 1.4.2.1
@@ -38,7 +38,7 @@
use vars
qw($VERSION @ISA @EXPORT @EXPORT_OK %opts $Config $from $subject $domain);
use Net::SMTP;
-use ISPMan::LDAP;
+use ISPMan;
require "ispman.conf";
open M, $opts{'m'};
@@ -63,7 +63,6 @@
);
my $mailhost = $self->{'Config'}{"mailhost"} || "localhost";
-my $smtp = Net::SMTP->new($mailhost);
$subject = $opts{'s'} || "No Subject";
$from = $opts{'f'} || $ldap->getConf('rootEmail');
@@ -71,8 +70,7 @@
print "Sending from $from\n";
for ( keys %$users ) {
- $mailAddress = $users->{$_}{'mailRoutingAddress'}
- || $users->{$_}{'mailLocalAddressxx'};
+ $mailAddress = $users->{$_}{'mailLocalAddress'};
$cn = $users->{$_}{'cn'};
if ($mailAddress) {
@@ -89,6 +87,7 @@
sub send_user_mail {
my ( $to, $data ) = @_;
+ my $smtp = Net::SMTP->new($mailhost);
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click