RE: [PHP] mail() some work some don't
| From: | Jennifer Goodie | Date: | Thu, 17 Apr 2003 00:45:15 +0000 |
| Subject: | RE: [PHP] mail() some work some don't | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144215@lists.php.net to get a copy of this message | ||
But are you sure your field name in your form matches your variable name in
your action? You said it works fine on one page and not another, I'm
guessing you are still on the same server, so that would point to the
variables being off, not server configuration and not the function. The \r
was just a general thing, I didn't expect it to fix anything.
> -----Original Message-----
> From: ruusvuu@whitney.dns2go.com [mailto:ruusvuu@whitney.dns2go.com]
> Sent: Wednesday, April 16, 2003 5:41 PM
> To: Jennifer Goodie
> Cc: PHP General
> Subject: RE: [PHP] mail() some work some don't
>
>
> I added the \r and it still doesn't put the email address in the
> From field
> Yes - the email field is required (JS) and I am filling this out myself
>
> Thanks
>
> Quoting Jennifer Goodie <goodie@apollointeractive.com>:
>
> > You sure that $_POST['email'] has a value?
> >
> > Also, I believe that the RFC calls for \r\n between headers, so
> even though
> > it will usually work with just a \n, it is technically incorrect.
> >
> > > -----Original Message-----
> > > From: ruusvuu@whitney.dns2go.com [mailto:ruusvuu@whitney.dns2go.com]
> > > Sent: Wednesday, April 16, 2003 5:28 PM
> > > To: PHP General
> > > Subject: [PHP] mail() some work some don't
> > >
> > >
> > >
> > > Hello Gang -
> > >
> > > I have a mail() script that works just fine
> > > I copied it to another page and it returns anonymous@ instead of
> > > the person who
> > > filled out the form
> > >
> > > CODE:
> > > <?php
> > > $to = "ruusvuu@whitney.dns2go.com";
> > > $subject = "GWA Information Request\n";
> > > $msg = "This information has been submitted:\n\n";
> > > foreach ($_POST as $key => $val)
> > > {
> > > if ($key == 'email')$email = $val;
> > > $msg .= "$key: $val\n";
> > > }
> > >
> > > $headers = "From: <$email>\n";
> > > $headers .= "Reply-To: <$email>\n";
> > > ?>
> > > Some html
> > > <?php
> > >
> > > if($key)
> > > {
> > > mail($to, $subject, $msg, $headers) or die
> > > ("Couldn't send mail!");
> > > }
> > > ?>
> > >
> > > Thanks
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>