Re: mail prob

From: Date: Fri, 23 Feb 2001 06:30:34 +0000
Subject: Re: mail prob
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-41272@lists.php.net to get a copy of this message
From: "W.D." <suedeuno@yahoo.com> > <form method="POST" action="<?php print ($PHP_SELF);?>"> > First Name: <input type=TEXT name="FirstName" size=15><p> > Last Name: <input type=TEXT name="LastName" size=25><p> > E-mail Address: <input type=TEXT name="Email" size=25><p> > <textarea name="Info" rows="5" cols="40" wrap=SOFT>Ask a > Question</textarea><p> > <input type=SUBMIT> <input type=RESET> > </font> > </form> > > > <?php > $from = $FirstName ." ". $LastName; > $subject = $Email; > $message = $Info; > mail("webmaster@domain.com, info@domain.com, $subject, $message, $from); > ?> > See, your syntax is incorrect :P Try: <?php $from = $Email; $subject = $Email; $message = "Question from $FirstName $LastName:\n\n$Info"; mail("webmaster@domain.com", $subject, $message, "From: $from\nCc: info@domain.com"); ?> I'm assuming you wanted to send a copy to info@domain.com Please read the docs for mail(): http://php.net/mail Regards Simon Garner

« previous php.general (#41272) next »