Hi all,
I want to send mail using mime::lite to email addresses in text file (say list.txt). Say the ids are [EMAIL PROTECTED], [EMAIL PROTECTED] & so on. My code is use MIME::Lite; my $user = 'myname'; my $pass = password'; open FH,'D:\perlprogs\list.txt'; @array = <FH>; MIME::Lite->send('smtp','servername', AuthUser=>$user, AuthPass=>$pass); for $i (0..2) { $array[$i]=~s/\n//; $array[$i]=~s/\s+//; my $email = "Mail send for testing."; my $subject = "hello test"; my $MailFrom = my email id; $to_list = $array[$i]; $msg = MIME::Lite->new( >From => $MailFrom, To => $to_list, Subject => 'Subject test', Type => 'TEXT', Encoding=> '7bit', Data => "This is a test messge" ); $msg->send(); } My problem is this code sys that id [EMAIL PROTECTED] doesn't exists. If I try @array = ('[EMAIL PROTECTED]','[EMAIL PROTECTED]') it works. The error is SMTP recipient command failed. I have gone through CPAN documentation of this command but no idea how to fix. Thanks & Regards, Sanket Vaidya http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _____________________________________________________________________