Hi every one. This is my portfolio www.zeropixels.net When someone send me message using contact us form. I didn't get email but I receive only his/her name and message. can anyone help me to fix this issue? Thanks and best regards, -waqar
This is not a css issue. Your email-done.php script is likely at fault. There is a sub forum for php issues. cheers, gary
on the script that handles the sending, check that the name used there and the name in the form are the same.
You can see result of email prntscr.com/3zyei1 here is code of email-done.php <?php $name = $_POST['message']; $email = $_POST['name']; $howufind = $_POST['email']; $surferip = $_SERVER['REMOTE_ADDR']; $time = date('l F d, Y, h:i A', strtotime('+10 hours')); $message = "<table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><table width='99%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><font face='Arial' color='#666666' size='3'><strong> CONTACT US</strong></font></td> <td align='right'><font face='Arial' color='#E32235' size='1'><strong>***** This is an auto generated notification for Contact Us form completion. *****</strong></font></td> </tr> </table></td> </tr> <tr> <td><table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td bgcolor='#666666' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong> Personal & Project Information:</strong></font></td> </tr> <tr> <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'> <tr> <td width='150'><font face='Arial' color='black' size='2'>Message :</font></td> <td><font face='Arial' color='black' size='2'>" . $message . "</font></td> </tr> <tr> <td><font face='Arial' color='black' size='2'>Name :</font></td> <td><font face='Arial' color='black' size='2'>" . $name . "</font></td> </tr> <tr> <td><font face='Arial' color='black' size='2'>Email :</font></td> <td><font face='Arial' color='black' size='2'>" . $email . "</font></td> </tr> </table></td> </tr> </table></td> </tr> </table> <br><br><table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td bgcolor='#e32235' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong> Visitor Tracking Details:</strong></font></td> </tr> <tr> <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'> <tr> <td width='150'><font face='Arial' color='#666666' size='2'>IP Address :</font></td> <td><font face='Arial' color='#666666' size='2'>" . $surferip . "</font></td> </tr> <tr> <td><font face='Arial' color='#666666' size='2'>Date & Time :</font></td> <td><font face='Arial' color='#666666' size='2'>" . $time . "</font></td> </tr> <tr> </table></td> </tr> </table></td> </tr> </table>"; $to = ""; $subject = "CONTACT US SUBMITTED"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $name . " <" . $email . ">" . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?>
you named the messages as $name. you can either rename it or just use mail($to, $subject, $name, $headers); Code (markup): also email you called it howufind and name you called email
<?php $message= $_POST['message']; $name= $_POST['name']; $email= $_POST['email']; $surferip = $_SERVER['REMOTE_ADDR']; $time = date('l F d, Y, h:i A', strtotime('+10 hours')); $message = "<table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><table width='99%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><font face='Arial' color='#666666' size='3'><strong> CONTACT US</strong></font></td> <td align='right'><font face='Arial' color='#E32235' size='1'><strong>***** This is an auto generated notification for Contact Us form completion. *****</strong></font></td> </tr> </table></td> </tr> <tr> <td><table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td bgcolor='#666666' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong> Personal & Project Information:</strong></font></td> </tr> <tr> <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'> <tr> <td width='150'><font face='Arial' color='black' size='2'>Message :</font></td> <td><font face='Arial' color='black' size='2'>" . $message . "</font></td> </tr> <tr> <td><font face='Arial' color='black' size='2'>Name :</font></td> <td><font face='Arial' color='black' size='2'>" . $name . "</font></td> </tr> <tr> <td><font face='Arial' color='black' size='2'>Email :</font></td> <td><font face='Arial' color='black' size='2'>" . $email . "</font></td> </tr> </table></td> </tr> </table></td> </tr> </table> <br><br><table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td bgcolor='#e32235' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong> Visitor Tracking Details:</strong></font></td> </tr> <tr> <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'> <tr> <td width='150'><font face='Arial' color='#666666' size='2'>IP Address :</font></td> <td><font face='Arial' color='#666666' size='2'>" . $surferip . "</font></td> </tr> <tr> <td><font face='Arial' color='#666666' size='2'>Date & Time :</font></td> <td><font face='Arial' color='#666666' size='2'>" . $time . "</font></td> </tr> <tr> </table></td> </tr> </table></td> </tr> </table>"; $to = "waqarrasheed1990@gmail.com"; $subject = "CONTACT US SUBMITTED"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $name . " <" . $email . ">" . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> Code (markup): This should work even though I just skimmed through it
I receive blank email after using this php code. see here. http://prntscr.com/408bpx please checkout my index file form code <div class="contact-form"> <form name="contact" method="post" action="email-done.php"> <textarea name="message" placeholder="Insert your message here:"></textarea> <input name="name" type="text" placeholder="Your Name:" /> <input name="email" type="text" placeholder="Your Email:" /> <input id="submit" type="submit" value="SUBMIT" onclick="return Validate();" /> </form>
Hi Waqar It sounds like there might be a problem with how your contact form is set up, particularly with the email configuration. There are a few steps you can take to troubleshoot and fix the issue: 1) Make sure that the email address where the messages are supposed to be sent is correctly configured in your website's contact form settings. Sometimes, a small typo in the email address can prevent emails from being sent. 2) Ensure that your website's SMTP settings are correctly configured. This is necessary for your server to send emails. If you're not sure how to set this up, check with your hosting provider or look at the documentation for your website platform (like WordPress, Joomla, etc.) 3) If you are using a specific plugin for your contact form, there might be an issue or conflict with another plugin or theme on your website. Try updating the plugin or temporarily disabling other plugins to see if that fixes the issue. 4) Check the error logs on your server to see if there are any errors related to sending emails. These logs can provide more details on what might be going wrong. 5) If you've tried the above steps and still face issues, consider contacting your hosting provider. They can help you check if there are any server-side issues blocking emails. Hopefully, one of these steps will help you resolve the issue! Let me know how it goes and feel free to ask for further help.