I've been trying to figure this out all day. I'm trying to create a simple back-end email interface that will allow user to enter a few fields and then mail off to several email recipients. I have figured out most of it with the exception of being able to create a link in the message. Please help. p.s. If there are suggestions for an entirely better way to do this, I'm open to them.Thank you, james.
my code:
$subj = "Try Our New Strawberry Bagels";
$chicken = $_POST['comments'];
$message = $chicken;
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$headers .= 'Bcc: [email protected]' . "\r\n";
while ($row = mysqli_fetch_assoc($result))
{
$emails = $row['email'] . ",";
mail($emails, $subj, $message, $headers);
}
?>
<form action="testMail.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
Comment:<textarea name="comments"
id="comments"> </textarea>
<input type="submit" />
</form>