Copy link to clipboard
Copied
have the a form that when it is sent get directed to two recipients how it is only getting through to one, what am i doing wrong please??
mysql_select_db($database_hostprop, $hostprop);
$Result1 = mysql_query($insertSQL, $hostprop) or die(mysql_error());
// Email Admin
$to = "name@email.com" . ", " ;
$to = "name2@email.com";
// Email Tenant
$subject = "New";
$message = "
<html>
<head>
<title>New </title>
</head>
<body>
<tr>
<td>Other Comments</td>
<td>".GetSQLValueString($_POST['otherComments'], "text")."</td>
</tr>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From:www.website.com <email@domain.com>' . "\r\n";
$send = mail($to,$subject,$message,$headers);
thanks in advance
Copy link to clipboard
Copied
Look at your variable assignment operation. You are assigning $to to the first address, then reassigning it to the second. You'd need to concatenate, right?
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now