- Impact
- 1
This should be simple but I'm overthinking this.
I want to grab a column called Email in my table which looks like this:
|-Name---------Email---------Group|
|[email protected]|
|[email protected]|
I simply need to grab the Email column and place it into an array which goes into a To: field of a simple php mail function like
So the script should constantly add a new To field for each column it goes through.
Ideas and code would be helpful.
Thanks :o
I want to grab a column called Email in my table which looks like this:
|-Name---------Email---------Group|
|[email protected]|
|[email protected]|
I simply need to grab the Email column and place it into an array which goes into a To: field of a simple php mail function like
Code:
<?php
$Name = "Da Duder"; //senders name
$email = "[email protected]"; //senders e-mail adress
$to = "[email protected]";
$to .= "[email protected]";
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
mail($recipient, $subject, $mail_body, $header); //mail command :)
?>
Ideas and code would be helpful.
Thanks :o