|
-
Aug 3rd, 2007, 05:53 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Emial From Array List
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 Code:
<?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<[email protected]>");
}
?>
Thank you in advance.
-
Aug 3rd, 2007, 07:19 AM
#2
Re: Emial From Array List
 Originally Posted by systech44
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 Code:
<?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<[email protected]>");
}
?>
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.
PHP Code:
for($i=0;$i<sizeof($emails);$i++)
{
mail($emails[$i], "Message", $str, "From: Tester<[email protected]>");
echo($emails[$i]);
}
-
Aug 3rd, 2007, 07:40 AM
#3
Re: Emial From Array List
Why do you need to send 500 emails?
-
Aug 6th, 2007, 01:23 AM
#4
Thread Starter
Hyperactive Member
Re: Emial From Array List
Actually I put my email wrong. I rectify it. Now it is working fine. Thank you for help and support.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|