Jump to content

Sending email from database addresses


jbrill

Recommended Posts

Im trying to send a mass email from a database of email addresses.

basically, once a user signs up, their email is inserted into  table in the database.

 

I would liek to make a link that i can click form the backend that says "send out newsletter"

this would take all the emails in the database and put them in outlook ( mail app for me), seperate each with a comma and then i could compose a message.

 

here's what i have come up with so far..

//Once connected to database


$mailto = mysql_query("SELECT * FROM newsletter");
while($row = mysql_fetch_array($mailto))
  {
echo "<a href=\">. $row['email'] ."/">Send out Newsletter</a>";

}

 

Ive had it working but obviously it s making each email a seperate link that says "send out newsletter" i would like it to be one link that combines all the emails in a "mailto:" format

 

Thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/58300-sending-email-from-database-addresses/
Share on other sites

if the mailto link accepts multiple email addresses thats cool but otherwise you'd have to teach your script to use fopen and fclose on a valid outlook contact list file. and get it to write all the addresses in perfect synch otherwise you could create a script to submit and email to all the emails stored along with a valid message sent. I don't know much about how to send mail with php either. :( How said. But its on my to do list.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.