|
|
#1 |
|
New Member
![]() Join Date: Oct 2010
Location: US
Posts: 11
|
I've tried a lot of different stuff to try and get my contact form to send the name, phone, company, and message in a single email. However, all I can get is it to just send the message. I used smoovo's php code from another thread, and that's what I tried to modify to get it to work.
Here's that code PHP Code:
PHP Code:
|
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Nov 2009
Location: New York
Posts: 370
|
Try adding some headers, some servers will only send if the header is formatted a certain way.
From Soovo: mail( "someone@example.com", "Subject: $subject", $message, "From: $email" ); Yours: mail( "wridenour87@gmail.com", $subject, $body ); I think adding a 'From' may solve it but it could be more involved. Are you getting any errors? Read this: http://php.net/manual/en/function.mail.php |
|
|
|
|
|
#3 | |
|
Gold Member
![]() Join Date: Oct 2010
Posts: 388
|
Quote:
For example: 1. Headers - Email configuration. (in your script you are using HTML, you should add HTML content type) 2. Email check - if the email entered is valid. So as bcee mentioned, add headers to your mail() function. The shorter header should be "From: $email". You can read more about "Headers" in the php.net website. - Enjoy. Last edited by smoovo; 11-05-2010 at 02:47 AM. |
|
|
|
|
|
|
#4 |
|
New Member
![]() Join Date: Oct 2010
Location: US
Posts: 11
|
I've tried all these solutions, but the problem is that it won't send the email at all. If I use the simple form, it sends, but I need all the information to send. At one point, it was sending the body code in the subject line. It's becoming very frustrating.
This is what I've got right now. PHP Code:
|
|
|
|
![]() |
| Tags |
| contact, form, php |
| Thread Tools | |
| Display Modes | |
|
|