HI, I had run into problems with my site and site was down for 4 months , now have added new features etc. Have to send a mail to all users about new features, have around 7500 How do I send a mail which automatically picks up the User Dislay name So the mail reads 'Dear ( User display name) ' Also in the same mail want to remind the user of his username and password. ' You username is (username) and password is (password) How to do this automatically for the 7500 users ???? Please help Regards Rajiv
It all depends on the programming language you're using. What is it. BTW. don't email passwords. Emails are not secure.
Hello, Following is the solution of your problem, I am assuming that you are getting userName, password, name, emailAddress from database table userTable. Following is an example: userTable userName password name emailAddress user1 pass1 name1 email1@domain.com user2 pass2 name2 email2@domain.com user3 pass3 name3 email3@domain.com Code (markup): Following is PHP code to send emails using this table <?php $conn = mysql_connect('www.yourDomain.com', 'username', 'password') or die("ERROR: Unable to connect to sever"); mysql_select_db('yourDatabaseName', $conn) or die("ERROR: Unable to find database"); $sql = "SELECT userName, password, name, emailAddress FROM userTable"; $result = mysql_query($sql) or die("Table does not Exist"); if(mysql_num_rows($result) > 0) { while($row = mysql_fetch_array($result)) { $to = $row['emailAddress']; $subject = "Subject of your email"; $msg = "Dear".$row['name'].",<br>User Name: ".$row['userName']."<br>Password: ".$row['password']."<br>You can add your message here & update this message according to your requirement"; $headers = "From: webmaster@example.com" . "\r\n" ."CC: somebodyelse@example.com"; mail($to,$subject,$msg,$headers); } } ?> PHP: This script will send email to all the users which are existing in this table. If you any any question, then ask..... I will try to help Thanks, Jimmy