2 Replies - 1546 Views - Last Post: 14 September 2010 - 09:23 AM Rate Topic: -----

#1 Guest_shanthi*


Reputation:

I used simple php mail function but it send an email in junk folder or

Posted 14 September 2010 - 05:59 AM

Hello all,

I have a form after successful submitting the form a mail is send to admin person regarding the form details and a thank you mail is send to the person who filled the form
For these I have used to mail function
The problem here I am getting is only one mail is getting in inbox and other mail is getting in spam
please let me know what to do and i just want to why the mails are going into spam

Here is the code i have been used for sending form details

$to  = "xx@company.in"; // note the comma
$subject = "$_POST[company_website]";
$headers  = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: About Reseller Account" . "<$_POST[email]>\r\n";
$headers .= "Cc:xx@company.in" . "\r\n";
$message ="I have used Html";
mail($to, $subject, $message, $headers);


//this mail is for thank you
$host = "ssl://smtp.gmail.com";
    $port = "465";

$to1  = "$_POST[email]"; 
$subject1 = "Thanks For Submitting form";
$headers1  = "MIME-Version: 1.0" . "\r\n";
$headers1 .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers1 .= "From: Enquiry About Reseller" . "<xx@company.in>\r\n";
$message1 ="I have used Html";
mail($to1, $subject1, $message1, $headers1);


This is the code I have been used I dnt know where the mistake please correct it

MOD EDIT: When posting code...USE CODE TAGS!!!

:code:

This post has been edited by JackOfAllTrades: 14 September 2010 - 06:08 AM
Reason for edit:: Added code tags


Is This A Good Question/Topic? 0

Replies To: I used simple php mail function but it send an email in junk folder or

#2 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,205
  • Joined: 19-January 10

Re: I used simple php mail function but it send an email in junk folder or

Posted 14 September 2010 - 07:30 AM

Nothing is wrong with your form. It's just that the receivers spam filter thinks it's spam. Maybe its because of too many links, are multiple emails going at the same time.
Was This Post Helpful? 0
  • +
  • -

#3 Valek  Icon User is offline

  • The Real Skynet
  • member icon

Reputation: 542
  • View blog
  • Posts: 1,713
  • Joined: 08-November 08

Re: I used simple php mail function but it send an email in junk folder or

Posted 14 September 2010 - 09:23 AM

Actually, it's more likely that the users' e-mails are finding it to be spam because you're sending e-mail through GMail, but it's not originating from GMail. As a result, it marks it as spam because spammers often do this to attempt to mask e-mail origins, or to pretend to be someone else.

I haven't used it, but I've heard that PHPMailer sometimes will succeed with keeping it from being marked as spam, when the mail() function fails.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1