Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Multi-mail
j-s
post Sep 27 2004, 03:19 PM
Post #1


Newbie [Level 2]
**

Group: Members
Posts: 28
Joined: 25-September 04
Member No.: 1,268



Hi !
I'd need to create a PHP script that would allow me to send an e-mail to many persons at the same time (newsletter). All the e-mail adresses are ine a MySQL database. So how do I do with the function mail() to send many e-mails ? Do I use loops or maybe an array ? But how to put the MySQL request in an array ?

Please help me.
Thanks in advance.
Go to the top of the page
 
+Quote Post
Magic-Node
post Sep 29 2004, 10:55 AM
Post #2


Newbie [Level 2]
**

Group: Members
Posts: 26
Joined: 14-September 04
Member No.: 1,116



CODE
$sql = mysql_query("SELECT email FROM xxx");
                                   
while($sql = mysql_fetch_array($sql))
{
mail($sql['email'], $subject, $message);
}
Go to the top of the page
 
+Quote Post
j-s
post Sep 29 2004, 12:06 PM
Post #3


Newbie [Level 2]
**

Group: Members
Posts: 28
Joined: 25-September 04
Member No.: 1,268



Only that ? Wah... it was a simple loop ? I thought I should create an array, but taht was to complex for what I know in PHP... Thank you man !
Go to the top of the page
 
+Quote Post
odomike
post Oct 1 2004, 11:34 PM
Post #4


Core2Q-QX6800
***********

Group: [HOSTED]
Posts: 1,093
Joined: 3-August 04
From: Nigeria
Member No.: 569



i must say that I am not so good in php scripting. I am very sorry that I cannot be of much help to you m8.
Go to the top of the page
 
+Quote Post
virrey
post Oct 8 2004, 07:06 PM
Post #5


Newbie
*

Group: Members
Posts: 9
Joined: 8-October 04
Member No.: 1,524



if you want more complex examples or more examples emails

you can use this tool phpmailer.sf.net

you can create html mails, add files,
biggrin.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Hosting With Php(18)
  2. Incredimail(7)
  3. Form To Php Mail. Attachment(14)
  4. Mail Settings To Configure Outlook Express(10)
  5. [photoshop]grunge Abstract Sig ~ Samma(9)
  6. New Dell Notebook(1)
  7. How To Create Embed Image Mail In Gmail(54)
  8. Has Anyone Got Paid Here!(9)
  9. Genuine Help With Smtp And Php Mail() Function(3)
  10. Free Sms E-mail Alert(12)
  11. Alert! Stay Off This Mail(6)
  12. Starting A Free Public E-mail Service(4)
  13. Php Functions To Send Mail(9)
  14. E-mail Manager(2)
  15. Google Mail Or Gmail(14)
  1. Which E-mail Service Do You Use?(51)
  2. Mail A Bloody Cow Head, And Get The Girl(11)
  3. Delete Mail Messages 1 Times In 24 H(3)
  4. Keep Getting Socket Error(3)
  5. Requirements For Mail()(2)
  6. [ruby]lite Multi-dimensional Array(0)
  7. Gmx Mail(3)
  8. Question Regarding Php Function(12)
  9. Can't Read E-mail(0)
  10. Which Mail For My Website?(9)
  11. No #1 Mail ?(5)
  12. Do You Have Mail?(6)
  13. Eight Crazy E-mail Hoaxes Millions Have Fallen For(0)


 



- Lo-Fi Version Time is now: 8th September 2008 - 07:17 AM