Click to See Complete Forum and Search --> : [RESOLVED] Emial From Array List
systech44
Aug 3rd, 2007, 05:53 AM
I am facing email related problem of php. I have 2 text files - list.txt contains emails list (say 500) and contents.txt contains the body of the letter. I like to retrieve the send the same contents in different mailers. Following is my code. But this is not working, though I do not receive any error. Please help me to solve it out.
<?php
$emails=file('http://72.52.158.223/list.txt');
$contents=file("http://72.52.158.223/contents.txt");
$str="";
for($i=0;$i<sizeof($contents);$i++)
{
$str=$str + $contents[$i] ;
}
for($i=0;$i<sizeof($emails);$i++)
{
mail($emails[$i], "Message", $str, "From: Tester<amitkumarlahiri@yahoo.co.in>");
}
?>
Thank you in advance.
visualAd
Aug 3rd, 2007, 07:19 AM
I am facing email related problem of php. I have 2 text files - list.txt contains emails list (say 500) and contents.txt contains the body of the letter. I like to retrieve the send the same contents in different mailers. Following is my code. But this is not working, though I do not receive any error. Please help me to solve it out.
<?php
$emails=file('http://72.52.158.223/list.txt');
$contents=file("http://72.52.158.223/contents.txt");
$str="";
for($i=0;$i<sizeof($contents);$i++)
{
$str=$str + $contents[$i] ;
}
for($i=0;$i<sizeof($emails);$i++)
{
mail($emails[$i], "Message", $str, "From: Tester<amitkumarlahiri@yahoo.co.in>");
}
?>
Thank you in advance.
If i were you I would remove the link to all those email addresses and your email address from the post as you've just published a spammers treasure trove.
What is wrong with it? Do you not receive the email? Set the error handling to E_ALL and put a debugging statement in the for loop.
for($i=0;$i<sizeof($emails);$i++)
{
mail($emails[$i], "Message", $str, "From: Tester<a@b.com>");
echo($emails[$i]);
}
penagate
Aug 3rd, 2007, 07:40 AM
Why do you need to send 500 emails? :confused:
systech44
Aug 6th, 2007, 01:23 AM
Actually I put my email wrong. I rectify it. Now it is working fine. Thank you for help and support.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.