When I try the following code, the mail gets to the people in the array properly, however everything else is shot into the body. The variables $nlSubject and $nlBody are from a form on the same page.
Code:
$addresses = file ($rootDir . "/utilities/newsletter.log") ;
$i = (0) ;
while ($i < count ($addresses)) {
mail ($addresses[$i], $nlSubject, $nlBody, "From:address@domain.com\r\nReply-to:address@domain.com") ;
++$i ;
}
Output in e-mail:
Subject: testing
From:address@domain.com
Reply-to:address@domain.com
testing
It appears that mail(); doesn't dig arrays? Is there a workaround to this? I don't want to have to revise the code for every new e-mail.
Thanks!