Results 1 to 4 of 4

Thread: [RESOLVED] Emial From Array List

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    266

    Resolved [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.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Emial From Array List

    Quote 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]);

    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Emial From Array List

    Why do you need to send 500 emails?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    266

    Thumbs up 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
  •  



Click Here to Expand Forum to Full Width