ispman/bin ispman.domainmail,1.4,1.5
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-serv29071 Modified Files: ispman.domainmail Log Message: Applied bugfix as suggested from [email protected] (merged from rel_1_2-bugfixes) Index: ispman.domainmail =================================================================== RCS file: /cvsroot/ispman/ispman/bin/ispman.domainmail,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ispman.domainmail 5 Jun 2004 12:45:18 -0000 1.4 +++ ispman.domainmail 8 Feb 2005 21:03:12 -0000 1.5 @@ -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