By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

Sending e-mail

P: 40
I have created an address book using php and mysql...I have provided check boxes for all my contacts list.Now my requirement is that i just want to check the required contacts and send e-mail to all those checked contacts at once..Is it possible with php?

Sep 18 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,584
If the problem is with getting the check box values;

here is the solution

<form id="form1" name="form1" method="post" action="mail_script.php">
<input type="checkbox" name="email[]" value=""/>
<input type="checkbox" name="email[]" value=""/>
<input type="checkbox" name="email[]" value=""/>

<input type="submit" name="button" id="button" value="Submit" />


$mail = $_POST['email'];

on selecting 1st and 3rd checkboxes, output will be
Expand|Select|Wrap|Line Numbers
  1. array(2) { [0]=>  string(17) "" [1]=>  string(17) "" } 
If the problem is with mail function;
You can pass multiple email addresses to php's mail function. read the manual here

And finally, I highly recommend you to use phpmailer for better performance.
Sep 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.