Forum Moderators: coopster
mail('address1@host, address2@host', $subject, $messageproper, "From: \"$yourname\" <$email>\nX-Sender: My site name" );
I have a value passed to the variables "yourname", "subject", "messageproper", "email" from a form I've set up.
Any ideas what's causing the double emails and how to solve this problem?
Thanks,
Johnquest
I don`t think you can have two e-mail addresses in the mail() function. For your example, try using two seperate functions. ie:
mail('address1@host', $subject, $messageproper, "From: \"$yourname\" <$email>\nX-Sender: My site name" );
mail('address2@host', $subject, $messageproper, "From: \"$yourname\" <$email>\nX-Sender: My site name" );
:)
Have you made sure the 2 emails are right? You are actually sending 2 emails by using them in the function. Sending the emails twice to who? Who is supposed to be sending the first and second email to?
I tried the above idea of having one address per mail function and this works fine, but I agree, the $to portion of the mail function should be able to take many addresses and send one e-mail to each. Why are there duplicates being sent?
Thanks,
johnquest