#!/usr/bin/perl use DBI; my $DB_NAME = 'smtpclient'; my $HOST_NAME = 'localhost'; my $USER_NAME = 'root'; my $PASSWORD = ''; my $dbh = DBI->connect ( "DBI:mysql:database=$DB_NAME;host=$HOST_NAME;", $USER_NAME, $PASSWORD, {'RaiseError' => 1} ); $query_from_email = qq { SELECT mail_from_account_id, mail_from_account_emai +l, mail_from_user, password, host, port, auth_type , verbose FROM smtp_account_info # LIMIT 100 }; #print $query_from_email."\n"; $sth_from_email = $dbh->prepare($query_from_email); $sth_from_email -> execute(); @to_id = ("samsonp_81\@yahoo.com","rangaprasadmutyala\@yahoo.co.in","h +emarajun\@yahoo.co.in","samsonp81\@gmail.com","samson.potla\@gmail.co +m"); #$to = 'samsonp_81@yahoo.com'; while (($mail_from_account_id, $from, $user ,$pass, $host, $port, $aut +h_type, $verbose ) = $sth_from_email->fetchrow_array ()){ for($i=0; $i <= $#to_id; $i++){ my $returncode = `/usr/local/mailcntr/sam_smtp.pl --host=$ho +st --port=$port --user=$user --pass=$pass --from=$from --to=@to_id[$i] --data=data.txt --ve +rbose=$verbose --auth-login`; print $returncode; } } but i need to enhance it more..
In reply to Re^2: mass mailing......
by johnny
in thread mass mailing......
by johnny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |