dsjoes Posted March 25, 2011 Share Posted March 25, 2011 The script below works but it goes straight to the junk folder only since i added the parts below to the form. (the form is in another file) How do i stop it from going to the junk folder. $error = $_GET['error']; $httpagent = getenv ('HTTP_USER_AGENT'); $url = $_SERVER['HTTP_REFERER']; <?php require_once "Mail.php"; $optional = $_POST['optional']; $error = $_POST['error']; $url = $_POST['url']; $httpagent = $_POST['browser']; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; $from = "Web server <removed>"; $to = "Admin <removed>"; $subject = "Someone has submitted an error."; $body = "Someone has submitted an error.\n". "Error: $error\n". "URL: $url\n". "Web browser: $httpagent\n". "Anything else you want to add?: $optional\n". "IP: $ip\n"; $host = "removed"; $username = "removed"; $password = "removed"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { header('Location: thank-you.html'); } ?> Link to comment https://forums.phpfreaks.com/topic/231691-pear-mail-going-to-spam/ Share on other sites More sharing options...
dsjoes Posted March 29, 2011 Author Share Posted March 29, 2011 anyone know anything i can do or try to get it working. Link to comment https://forums.phpfreaks.com/topic/231691-pear-mail-going-to-spam/#findComment-1193878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.