mmarif4u Posted April 30, 2007 Share Posted April 30, 2007 Hi guys... I want to send emails to my users, For example i have a package and i want to get notice to the users, So i will send emails to users from db. I have some script but how to send email to all users from db. Any body have some idea. Link to comment https://forums.phpfreaks.com/topic/49277-send-email-to-all-users-in-db/ Share on other sites More sharing options...
tauchai83 Posted April 30, 2007 Share Posted April 30, 2007 post your code here first. At least give us the clue on how you start first. Link to comment https://forums.phpfreaks.com/topic/49277-send-email-to-all-users-in-db/#findComment-241455 Share on other sites More sharing options...
mmarif4u Posted April 30, 2007 Author Share Posted April 30, 2007 Email to users code i have but selecting from db is the main issue. I just need a clue how to select it from db. Link to comment https://forums.phpfreaks.com/topic/49277-send-email-to-all-users-in-db/#findComment-241457 Share on other sites More sharing options...
tauchai83 Posted April 30, 2007 Share Posted April 30, 2007 oic. I never try that before. for sure, need to query DB. i will try it out when i go home. Link to comment https://forums.phpfreaks.com/topic/49277-send-email-to-all-users-in-db/#findComment-241458 Share on other sites More sharing options...
mmarif4u Posted April 30, 2007 Author Share Posted April 30, 2007 Thanks man i got some point: Like... $result = mysql_query("SELECT email FROM table"); while ($row = mysql_fetch_array($result)) { mail($row['email'], "My Subject", "Amazing news! I have a package for you!", "From: [email protected]"); } I am trying this and hope it will work. Link to comment https://forums.phpfreaks.com/topic/49277-send-email-to-all-users-in-db/#findComment-241461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.