Jump to content


Photo

i have issues, email


  • Please log in to reply
2 replies to this topic

#1 ineedprofesionalhelp

ineedprofesionalhelp
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 16 April 2006 - 05:39 PM

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!";
}
?>

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 16 April 2006 - 06:32 PM

The $headers variable should contain the "From:" header.

Try this:
<?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";
?>

Ken


#3 ineedprofesionalhelp

ineedprofesionalhelp
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 17 April 2006 - 08:53 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users