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?
Sending e-mail
Started by Divya, Sep 17 2008 09:50 PM
5 replies to this topic
#1
Posted 17 September 2008 - 09:50 PM
|
|
|
#2
Posted 18 September 2008 - 02:37 AM
ya its possible in php. you want to post checked contacts email id. then through loop you can do that
#3
Posted 18 September 2008 - 06:18 AM
Its quite simple,
First query the sql database and display all the email addresses with a check box next to them (name the check box via id) in a html form. On submit, get the ids that are checked (true) and query the database for those email addresses. Then use the php mail function to send the email. You will need to make the emails comma separated "a@cc.net, b@cc.net". That should do the trick :)
First query the sql database and display all the email addresses with a check box next to them (name the check box via id) in a html form. On submit, get the ids that are checked (true) and query the database for those email addresses. Then use the php mail function to send the email. You will need to make the emails comma separated "a@cc.net, b@cc.net". That should do the trick :)
#4
Posted 18 September 2008 - 12:49 PM
Of course, it is possible.
Use the mail()
This article may be helpful:
dk2.php.net/manual/en/book.mail.php
Use the mail()
This article may be helpful:
dk2.php.net/manual/en/book.mail.php
#5
Posted 18 September 2008 - 06:06 PM
Divya said:
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?
Your contacts database needs to have a boolean column (lets call it sendEmail) that represents the state of the check box - 1 implies checked, 0 unchecked. Simply iterate through your entire table, using a while loop, and if "sendEmail" is 1, send that user an email using the mail() function.
#6
Posted 21 September 2008 - 09:58 AM
Headers and title must also be included using the mail sent, but said a look at this link:
PHP: Mail - Manual
You get the use of mail() function :)
PHP: Mail - Manual
You get the use of mail() function :)
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk
Http://www.ArtoStiloz.Dk


Sign In
Create Account


Back to top









