Hey, i am trying to make a email contact form for my website i can create one, but only for one recipent. i want to make one so that it has more than one, for example one being the site admin and the other being the product lister. any help would be appreciated.
thanks
Email Contact Form
Started by Crofty, Sep 24 2006 06:57 AM
4 replies to this topic
#1
Posted 24 September 2006 - 06:57 AM
#2
Posted 24 September 2006 - 07:53 AM
Just off the top of my head here 
Just a basic idea for you
<?php
$emails = array('mail@domain.com', 'mail2@domain.com');
foreach( $emails as $addr )
{
mail($addr, $subject, $message, $headers);
}
?>
Just a basic idea for you
#3
Posted 24 September 2006 - 08:01 AM
oh sorry did explain it well enough i mean like in a combo box so they choose who to send to
#4
Posted 24 September 2006 - 08:12 AM
Ahh right i see.
HTML time
Matt.
HTML time
<select name="email"> <option value="mail1@domain.com">Person One</option> <option value="mail2@domain2.com">Person Two</option> </select>
Matt.
Edited by Matthew., 24 September 2006 - 08:12 AM.
#5
Posted 24 September 2006 - 08:22 AM
lol, I was looking for the way to send 1 email to multiple receipients.
# Common Headers $headers .= 'From: Jonny <jon@genius.com>'.$eol; $headers .= 'CC: Tony <tony@genius.com>'.$eol; $headers .= 'Reply-To: Jonny <jon@genius.com>'.$eol; $headers .= 'Return-Path: Jonny <jon@genius.com>'.$eol; // these two to set reply address $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters
Edited by SpatialVisionary, 24 September 2006 - 08:24 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
