Jump to content

how to send email message to multiple emails in a database using php


francis Aneke

Recommended Posts

how can one send email message to multiple emails in a database using php.

The code has to fetch out the emails one by one and then send the message to them

Link to comment
Share on other sites

What code are you using now to send the email? If you use a loop then you just put that code inside the loop that gets each address. If you want to use the CC header then that's just one more thing to add to the email headers.

Link to comment
Share on other sites

Am frankly using php if u can give me a hint may be by using for loop or for each statement to iterate through all the emails in the database and pass the message to all of them

Link to comment
Share on other sites

It's just a regular foreach loop, I'm not sure where your confusion is.

foreach ($emails as $email) {  // send the email to $email}
There are several ways to actually send the email. Phpmailer is a popular choice.
Link to comment
Share on other sites

still couldn't solve it.

Remember that all the emails are being fetched out of database........

So its like you didnt note that one..

 

There are several ways to actually send the email. Phpmailer is a popular choice.

 

please how?

Edited by francis Aneke
Link to comment
Share on other sites

No you did well chikwado, it does not violate w3schools policy,its ok because even moderators are making that kind of reference, so far it can help at all cost......Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...