in reply to Re^3: Just can sent only ONE mail every time.
in thread Just can sent only ONE mail every time.
Fixed! Thanks everybody.
I only add a sub "over" and comment the sub "quit" in sendMail :
I only add a sub "over" and comment the sub "quit" in sendMail :
sub over { $self = @_; $self->{SMTP}->quit;
Then i add the sub in end of my a.pl
... use MySMTP; $mail = new MySMTP(); my @lists = $mail->get_list(); for my $addr (@list) { $mail->sendMail($addr,"how are you"); } $mail->over(); ## Add here
In Section
Seekers of Perl Wisdom