
Teething problems with sending a contact form via PHP
- or -
Post a project like this4203
£10(approx. $13)
- Posted:
- Proposals: 5
- Remote
- #442894
- Completed
Description
Experience Level: Entry
General information for the website: Contact form issue on website with PHP
Description of every page/module: Essentially, I have a fairly large form and it has the following which is included for the PHP submission.
$to = 'test@test.com' . ', '; // note the comma
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Test ' . "\r\n";
$headers .= 'From: Form ' . "\r\n";
$headers .= 'Cc: test@test.com' . "\r\n";
$headers .= 'Bcc: test@test.com' . "\r\n";
However, when I have the headers included in the following:
mail($to, $subject, $message, $headers, $from);
The mail doesn't send. It's probably something very simple to resolve but I can't get my head around it. As soon as I remove the headers section it will send the email. However then the email isn't styled into the table format I have built.
I think it may be something to do with the server but am unsure?
Please quote and be available to start ASAP as I need this completing today or tomorrow to discuss over Skype if need be.
Description of requirements/features: Contact form issue on website with PHP
Extra notes:
Description of every page/module: Essentially, I have a fairly large form and it has the following which is included for the PHP submission.
$to = 'test@test.com' . ', '; // note the comma
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Test ' . "\r\n";
$headers .= 'From: Form ' . "\r\n";
$headers .= 'Cc: test@test.com' . "\r\n";
$headers .= 'Bcc: test@test.com' . "\r\n";
However, when I have the headers included in the following:
mail($to, $subject, $message, $headers, $from);
The mail doesn't send. It's probably something very simple to resolve but I can't get my head around it. As soon as I remove the headers section it will send the email. However then the email isn't styled into the table format I have built.
I think it may be something to do with the server but am unsure?
Please quote and be available to start ASAP as I need this completing today or tomorrow to discuss over Skype if need be.
Description of requirements/features: Contact form issue on website with PHP
Extra notes:

Bradley W.
100% (21)Projects Completed
26
Freelancers worked with
21
Projects awarded
59%
Last project
24 Dec 2019
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies