ineedprofesionalhelp Posted April 16, 2006 Share Posted April 16, 2006 Hello !I am a so called noobie in php scripting so I will appreciate any help I get. I am using a verry simple php script to send emails but the emails arrive in the junk folder. I know that its not from my smtp. I used my ISP smtp, please HELP. Thanks.<?php$to = "what@ever.com";$subject = "ineedhelp.";$headers .= "MIME-Version: 1.0\r\n";$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";$message = "<html><body>";$message .= "<h1><b>It arrives in junk!</b></h1>";$message .= "</body></html>";if ( mail($to,$subject,$message,$headers) ) { echo "The email has been sent!"; } else { echo "The email has failed!"; }?> Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 16, 2006 Share Posted April 16, 2006 The $headers variable should contain the "From:" header.Try this:[code]<?php$headers = "Your Name <youremailaddress@your.domain>\r\n"$headers .= "MIME-Version: 1.0\r\n";$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";?>[/code]Ken Quote Link to comment Share on other sites More sharing options...
ineedprofesionalhelp Posted April 17, 2006 Author Share Posted April 17, 2006 I've tryed that, but still arives in my junk folder. Please tell me what can i do to receive the email in my inbox folder. Thank you. 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.