Hello friends, I know hot to code my form to send mail to the only one enter email, but when i try to enter more thatn one email and seperate them with comma(,) the mail did not go, how can i do it. regards
Loop through, heres a basic example... <?php //comma seperated list... $emails = "hey@danx10.com,admin@digitalpoint.com"; $emails_array = explode(",", $emails); foreach($emails_array as $email) { //place mail() or whatever here... and use $email as the recipient? } ?> PHP:
The following works on my test server, both emails are sent. mail("firstemail@test.com, secondemail@test.com", "Two mails at once", "This is a test"); PHP: