benzetti82 Posted March 30, 2010 Share Posted March 30, 2010 So I was trying to change up my script to dress it up a bit but it's not working... I am still kind of new to PHP... Any ideas? <?php ini_set("SMTP","relay-hosting.securesever.net"); ini_set("sendmail_from","info@mydomain.com"); $headers = "From: " . strip_tags($_POST['req-email']) . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $completemessage = '<html><body>'; $completemessage .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; $completemessage .= "<tr style='background: #eee;'><td><strong>First Name:</strong> </td><td>" . strip_tags($_REQUEST['firstname']) . "</td></tr>"; $completemessage .= "<tr><td><strong>Last Name:</strong> </td><td>" . strip_tags($_REQUEST['lastname']) . "</td></tr>"; $completemessage .= "<tr style='background: #eee;'><td><strong>Phone:</strong> </td><td>" . strip_tags($_REQUEST['phone']) . "</td></tr>"; $completemessage .= "<tr><td><strong>Email:</strong> </td><td>" . strip_tags($_REQUEST['email']) . "</td></tr>"; $completemessage .= "<tr style='background: #eee;'><td><strong>Message:</strong> </td><td>" . strip_tags($_REQUEST['message']) . "</td></tr>"; $completemessage .= "</table>"; $completemessage .= "</body></html>"; mail( "info@mydomain.com", "MYDOMAIN.com Contact/Feedback", $completemessage, $headers); header("Location: thankyou.php"); ?> Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted March 30, 2010 Share Posted March 30, 2010 Maybe thies isn't supposed to be securesever but secureserver instead? ini_set("SMTP","relay-hosting.securesever.net"); Quote Link to comment Share on other sites More sharing options...
o3d Posted March 30, 2010 Share Posted March 30, 2010 First off, are there any errors? Secondly check that your mail function returns with a true value. if (mail(...)) { header("Location: thankyou.php"); } else { echo 'could not send mail...<br />'; } Quote Link to comment Share on other sites More sharing options...
benzetti82 Posted March 30, 2010 Author Share Posted March 30, 2010 Oh sorry the form works. Its just the CSS styles aren't displaying as they should... Is this a limitation of CSS with email programs such as outlook? Also how would I code it so that the FROM in my email shows the actual persons email address? Quote Link to comment Share on other sites More sharing options...
benzetti82 Posted March 30, 2010 Author Share Posted March 30, 2010 Ok duh I screwed something up on my end... The only other issue I am having is that I can't get the FROM to correctly display the submitters email... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.