Page 1 of 1

PHP / smtp? Smartermail (don't receive any email)

Posted: Mon Apr 20, 2015 10:55 am
by weiktoh
I created a HTML/PHP on my online contact form.
after insert all information ,and return to the index.html
i still don't receive any email from the website .

how can i fix this ?
sorry, I'm working on improving my english.

Code: Select all

<?php
if(isset($_POST['submit']))  {
   $msg = 'Company: '.$_POST['company']."\n"
   .'Address: '.$_POST['address']."\n"
   .'Website: '.$_POST['website']."\n"
   .'Your Contact: '.$_POST['contact']."\n"
   .'Email : '.$_POST['email']."\n"
   .'Remark : '.$_POST['remark']."\n";
   mail('sale@jadepack.com.sg', 'Online Enquiry', $msg);
   header('location: index.html');
} else {
   header('location: onlineenquiry.html');
   exit(0);
}


?>
Image

http://www.jadepack.com.sg/onlineenquiry.html

Re: PHP / smtp? Smartermail (don't receive any email)

Posted: Tue Apr 21, 2015 10:15 am
by Celauran
Try capturing the result of the mail call and inspecting that rather than redirecting. Additionally, check your mail log. It's possible the email is being sent and not received, and it's possible that it's not being sent all. Knowing which is the case is the first step in troubleshooting this.

Re: PHP / smtp? Smartermail (don't receive any email)

Posted: Thu Apr 23, 2015 12:55 pm
by weiktoh
how can I check for the possible case?
mail log ,is it from my smtp? or using 3rd party software
Sorry, i don't have any knowledge on this

Re: PHP / smtp? Smartermail (don't receive any email)

Posted: Thu Apr 23, 2015 1:12 pm
by Celauran
It's your mail server's log. Usually found in /var/log