It seems like I'm always having problems with the mail function. I'm trying to send emails to an array of email addresses which you can see with the extract of code below; $thelist [] = "email@email.com"; $thelist [] = "email2@email.com"; mail("' . $thelist[$i] . '",$subject,$message,$mailheaders); PHP: When I replace ' . $thelist[$i] . ' with my email address it works. The $i is referenced from the for loop and the fact it send the email when I do the replacement means the problem has been identified in the syntax of the email address section. I've tried a few things but can't get it to work. If anyone has an idea you would save me a major headache!