bartalen Posted July 30, 2011 Share Posted July 30, 2011 Delete please , added more then once sorry Quote Link to comment https://forums.phpfreaks.com/topic/243276-send-mail-to-users-from-db/ Share on other sites More sharing options...
voip03 Posted July 30, 2011 Share Posted July 30, 2011 Select the user email address from the user db. // Send email $from = "form whom"; // sender info $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: $from\r\n"; $email = receiver email address; //mail body $mail_body=" -- The info u want to send ---"; if (mail($email,"Subject ", $mail_body,$headers)) { echo “ mail send”; } else { echo “mail failed"; } Quote Link to comment https://forums.phpfreaks.com/topic/243276-send-mail-to-users-from-db/#findComment-1249418 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.