Exforsys
+ Reply to Thread
Results 1 to 5 of 5

Struck with the Task

This is a discussion on Struck with the Task within the PHP forums, part of the Programming Talk category; I have a requirement to send mails to all users defined in a table named as authors. I am struck ...

  1. #1
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122

    Exclamation Struck with the Task

    I have a requirement to send mails to all users defined in a table named as authors. I am struck with this process. Can someone give me guidelines for coding this process? Kindly help me out to finish this process.


  2. #2
    priyaraji is offline Member Array
    Join Date
    Apr 2006
    Answers
    52
    You can write a query as below:

    $uemail = mysql_query("select emails from authors");

    and then write a function for sending emails as
    message = generateEmailMessage()


  3. #3
    Sam Jepsum is offline Member Array
    Join Date
    Dec 2010
    Answers
    34
    You should also use an array to do the same action for every email in the table.


  4. #4
    neerajnim is offline Junior Member Array
    Join Date
    Dec 2010
    Answers
    1
    Just extract the author emails from the database table. Now cretae string $Cc and then put them in $Cc by using while loop to concate all the emails separated by "," operator store this newly generated string of emails. Now copy this $Cc to $header attribute of email($to, $subject, $message, $header) function. Now call the email function as shown above. You can concate the 25-30 emails in $Cc at a time. In this way you can send the email to 25-30 authors in one go.

    I hope this will help you.


  5. #5
    balaganesh is offline Junior Member Array
    Join Date
    May 2012
    Answers
    1
    u can use mail function for it


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...