|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Aug 2005
Location: New York
Posts: 95
|
PHP Contact Form - Setting Return Path for Emails
I have a few PHP contact forms on my website. I use the following (or similar) to set up the code for emailing the info enterd into the form:
Code:
$to = "$myemail"; $subject = "Subject"; $body = "Body"; $headers = "From: $theiremail\r\n"; $headers .= "Return-Path: $myemail\r\n"; mail($to, $subject, $body, $headers); I know a decent amount of PHP, but I'm certainly no expert. Does anyone know what I'm doing wrong here? I'd really appreciate any help in getting this to work the way I want. Thanks, Jill |
|
|
|
|
|
#2 |
|
Chop Chop
|
Under Windows, the From header sets the return path. It seems to me that the return path should be their email not yours. Try removing the Return Path header and see what happens.
http://us3.php.net/function.mail |
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Aug 2005
Location: New York
Posts: 95
|
Thanks, catacon. I tried it, but it didn't work.
I've used the Reply-To header successfully before. When I hosted with Yahoo, the server wouldn't allow an email to be sent from an email address outside your domain. So to be able to simply reply to a contact form submission, I had to set the Reply-To to the person's email address since I could not set the From header to it. I'm using different hosts now. However, for some reason the Return-Path header is being ignored, at least in the context in which I'm using it in my contact forms. I'm having the problem on two different hosts (both Linux). I know it's not simply the servers since the photo gallery, etc. are somehow able to set the return path correctly. I'll have to keep digging and see what I can find. Thanks, Jill |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need a contact form | patru | Web Design / Development | 2 | 07-17-2007 03:02 PM |
| php email form | michael0224 | Web Design / Development | 2 | 07-25-2006 10:38 AM |
| Computer Acronyms | Floppyman | Computer Hardware | 156 | 06-18-2006 06:25 AM |
| php form doesnt work | darkside | Web Design / Development | 2 | 08-26-2005 03:15 PM |
| Setting up Apache Server with PHP | fatboyjim | Internet, Web Applications, & The Cloud | 4 | 11-23-2002 05:32 PM |