Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8913287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:25:18+00:00 2026-06-15T04:25:18+00:00

I am working for my college website . I wrote a php script ,that

  • 0

I am working for my college website . I wrote a php script ,that sends email using php mail function. But the problem is ,all the emails that I send is going into the recipients spam /Junk Folder.

In order to resolve it :

I tried all the steps and answers for the similar issues in stackoverflow and serverfault website Like:
*Proper Header
*Accurate From Name,etc
But yet the problem is unresolved.

This is the php code for sending email:

<?php
$from_address="webmaster@".$_SERVER['SERVER_NAME'];
$from_name="webmaster";
$headers = "MIME-Version: 1.0\r\n"
  ."Content-Type: text/plain; charset=utf-8\r\n"
  ."Content-Transfer-Encoding: 8bit\r\n"
  ."From: =?UTF-8?B?". base64_encode($from_name) ."?= <$from_address>\r\n"
  ."X-Mailer: PHP/". phpversion();
$subject="Web Mail Testing";
$body="This is test Message";
$to="riteshkumargupta1990@gmail.com";
mail($to, $subject, $body, $headers, "-fwebmaster@{$_SERVER['SERVER_NAME']}");
echo "The Mail is  SuccessFully Sent to :".$to;
?>

I am also attaching the original email (that i received in my gmail account “riteshkumargupta1990@gmail.com”)

Delivered-To: riteshkumargupta1990@gmail.com
Received: by 10.204.8.210 with SMTP id i18csp146000bki;
        Wed, 21 Nov 2012 20:58:12 -0800 (PST)
Received: by 10.68.219.164 with SMTP id pp4mr1119127pbc.72.1353560291776;
        Wed, 21 Nov 2012 20:58:11 -0800 (PST)
Return-Path: <webmaster@nitw.ac.in>
Received: from www.nitw.ac.in (www.nitw.ac.in. [218.248.13.200])
        by mx.google.com with ESMTPS id sh10si3456960pbb.293.2012.11.21.20.58.10
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 21 Nov 2012 20:58:11 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of webmaster@nitw.ac.in designates 218.248.13.200 as permitted sender) client-ip=218.248.13.200;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of webmaster@nitw.ac.in designates 218.248.13.200 as permitted sender) smtp.mail=webmaster@nitw.ac.in
Received: from www.nitw.ac.in (localhost.localdomain [127.0.0.1])
    by www.nitw.ac.in (8.13.8/8.13.8) with ESMTP id qAM50M0h016190
    for <riteshkumargupta1990@gmail.com>; Thu, 22 Nov 2012 10:30:23 +0530
Received: (from nobody@localhost)
    by www.nitw.ac.in (8.13.8/8.13.8/Submit) id qAM50McG016189;
    Thu, 22 Nov 2012 10:30:22 +0530
Date: Thu, 22 Nov 2012 10:30:22 +0530
Message-Id: <201211220500.qAM50McG016189@www.nitw.ac.in>
X-Authentication-Warning: www.nitw.ac.in: nobody set sender to webmaster@nitw.ac.in using -f
To: riteshkumargupta1990@gmail.com
Subject: Web Mail Testing
X-PHP-Originating-Script: 0:mailer.php
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: =?UTF-8?B?d2VibWFzdGVy?= <webmaster@nitw.ac.in>
X-Mailer: PHP/5.3.5

This is test Message

Also while googling I found the uncommon reason for this sort of problem is server Blacklisting .

Then I use the following Tool to test it : http://www.mxtoolbox.com/SuperTool.aspx?action=mx%3anitw.ac.in#

I got shocked when the above tool test found my server in the black-list. How is this true?Since the original mail that i attached above says “:Received-SPF: pass (google.com: best guess record for domain of webmaster@nitw.ac.in designates 218.248.13.200 as permitted sender)

Also if my server is blacklisted , then how can i find the reason for blacklist and how to resolve it?

UPD:
From Shadow Comment : Can “X-Authentication-Warning: http://www.nitw.ac.in: nobody set sender to webmaster@nitw.ac.in using -f” msg be the probable reason? If yes , How can I Fix it?

Thank You!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:25:19+00:00Added an answer on June 15, 2026 at 4:25 am

    Setting up SMTP server is tricky and tedious task unless it is ur job do it day in and day out.., Check if your server SSL certificate are signed properly with an authorized CA certificate., some times it could be the problem of a self signed certificates .,

    Or you can also try out Gmail As your SMTP server which solves many problems .., Link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a website for my church's college group, and am started
Ok, I'm working on a php college project, and I have to let students
Hey, I'm a fresh out of college graduate. I'm working on a project that
Working with an undisclosed API, I found a function that can set the number
I am working with database data that manipulates college students exam results. Basically, I
I am working on a project for college that uses GWT, Hibernate and Gilead.
I am working on a Java project for college that involves us setting up
Right now I'm working on PHP. I am using the Doctrine ORM and the
I am working on a project for a local college using MVC3. I have
I have the following code that I am working on for my college assignment.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.