Jump to content

PHP mail() ends in Junk Mail


areeb

Recommended Posts

Hello, all ...I have created a HTML Form Mail.It is working fine, and the mail is being succesfully delivered but the mail is ending in the Junk Mail of my hotmail :) Here is the Code of my Form Mail ...I have excluded almost everything, and am just including the portion which actually sends the mail..Please Note that the message sent in the email is in HTML Format ..

<?php // after the form processing has been done and the emails have been validated.// Now I will define the headers and mail to be sent ..$message = "An HTML Message";$to      = "myemail@hotmail.com";$subject = "Feedback about ur Website";// Now Setting the additional Headers$headers  = "MIME-Version: 1.0\r\n";$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";$headers .= "To: Areeb <myemail@hotmail.com>\r\n";$headers .= "From: My Visitor <visitor@gmail-or-any-other.com>\r\n";// Now sending the mailmail($to, $subject, $message, $headers);?>

Thats the end ..This mail, is ending up in the Junk Mail :)Any Possible solution ??

Link to comment
Share on other sites

website's emails tend to end into the spam folder of many email servers.The only way to get the user accept it is to tell the user to allow that origin to go to the inbox.

U mean to say that there is nothing wrong with the Coding ...but why website email is ending up in Spam Folder ????I mean in hotmail address I get emails from a number of websites, e.g. Hotscripts, Resource Index, and many many more, but they come directly to my Inbox :) ...Some-one told me that ur email ends in Junk Mail, either if :1) It has some risky words2) If u are spamming3) If ur SMTP is not known ...Surely, option 1 and 2 are out as I am doing neither of the two ...so is the reason of SMTP ???
Link to comment
Share on other sites

You probably want to ask hotmail about this. Also try copying and pasting the headers for an email you received (not the code, the headers that the actual email contains). You may need to reconfigure the mail server to send out different headers.

Link to comment
Share on other sites

You probably want to ask hotmail about this.  Also try copying and pasting the headers for an email you received (not the code, the headers that the actual email contains).  You may need to reconfigure the mail server to send out different headers.

Well hotmail was just an example.I have also tried it with Gmail and Yahoo, and everywhere it is ending in Junk/Bulk Mail :)Adding to safe list is useless, because I want to use it an an autoresponder.I mean, if someone, filled the contact form on my website, a Thank You email will be sent to the person, who filled the form.Now every person has a different email address, so everyone will not add the address to the safe list :)Reconfiguring Mail Server.I am using a Web Host which uses cPanel,can we reconfigure it ?If yes than how.Sorry to ask this but I am not too good in dealing with emails :)I checked the mail, and the email contains the same headers which I used
Link to comment
Share on other sites

If you don't have physical access to the email server, then you probably can't change the headers it sends out. I meant to say copy and paste the headers into the forum. You can remove any domains or email addresses, I just want to see what the headers are that the mail server is attaching.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...