I've got a strange problem I setup my SMTP server on windows server for my PHP IIS and I've been sending mails from there but while my gmail account receives this mail my PHP hosting server doesn't receives these mails. I thought it might be blocked or spammed on my PHP server but it seems clear. Any ideas anyone?

SOLVED IT with adding my domain's name on sent_from line in PHP.ini file

here is my PHP code:

if (isset($_POST['submit'])) { $msg .= "Time: " . date("m/d/y g:ia", time()) . "\n"; $msg .= "Company Name: " . $compname . "\n"; $msg .= "Booking Name: " . $opp['opname'] ."\n" ; $msg .= "Record Manager: " . $opp['recmanager'] ."\n" ; $msg .= "Create Date: " . substr($opp['createdate'],0,-7) ."\n" ; foreach ($_POST as $field=>$value) { if ($field != "submit") $msg .= $field . ": " . $value . "\n"; } mail("[email protected]", "Modification Request", $msg, "From:" . $_POST['email'] . "");


Gmail "Show Original" dump

Delivered-To: [email protected]

Received: by with SMTP id b7csp172675qeb; Tue, 26 Feb 2013 07:50:38 -0800 (PST)

X-Received: by with SMTP id sf7mr24143724pbb.21.1361893838188; Tue, 26 Feb 2013 07:50:38 -0800 (PST)


Received: from CRMSRV01 (60-241-185-105.static.tpgi.com.au. []) by mx.google.com with ESMTP id ak6si1269596pbd.104.2013.; Tue, 26 Feb 2013 07:50:38 -0800 (PST)

Received-SPF: neutral (google.com: is neither permitted nor denied by best guess record for domain of string@crmsrv01) client-ip=;

Authentication-Results: mx.google.com; spf=neutral (google.com: is neither permitted nor denied by best guess record for domain of string@crmsrv01) smtp.mail=string@crmsrv01 Received: from CRMSRV01 ([]) by CRMSRV01 with Microsoft SMTPSVC(7.5.7601.17514); Wed, 27 Feb 2013 02:50:33 +1100

Date: Wed, 27 Feb 2013 03:50:33 +1200

Subject: Cancel Request

To: [email protected]

X-PHP-Originating-Script: 0:cancel.php

From:[email protected]

Return-Path: string@CRMSRV01


X-OriginalArrivalTime: 26 Feb 2013 15:50:33.0901 (UTC) FILETIME=[0328A5D0:01CE1439]

Time: 02/27/13 3:50am

Company Name: XXXX


Dropped Message Detail:

Reporting-MTA: dns;CRMSRV01

Received-From-MTA: dns;CRMSRV01

Arrival-Date: Wed, 27 Feb 2013 04:09:30 +1100

Final-Recipient: rfc822;[email protected]

Action: failed

Status: 5.5.0

Diagnostic-Code: smtp;550 Access denied - Invalid HELO name (See RFC2821

1 Answer 1


Check the event and sever logs on both ends. That will help localize the problem. Also, more information is needed on OS on both ends.

  • On Windows side server is 2008 R2 and on it PHP for IIS runs, on the other hand I'm not sure about the linux server it's a shared domain. Strange thing is I still receive mails to my gmail account but when try to change to my domain name [email protected] I cannot receive mails.
    – Jas
    Feb 26, 2013 at 15:32
  • Check the Event log. That's the first place to look for send/receive problems with SMTP MS Platforms. If it's getting denied or there's any problem with the transmission, it will spell it out for you.
    – Techie Joe
    Feb 26, 2013 at 15:39
  • Checked the event log there are no errors on that time even I tried it again there was no new errors actually there was no place for SMTP errors. I will post my PHP code, could you please have a look at it, it works perfectly normal when use it somewhere else but when use it in this server it gives this problem (is it because of I didnt configure the SMTP server correctly because headers in gmail are very strange)
    – Jas
    Feb 26, 2013 at 15:47
  • SMTP wouldn't show up as a red error all the time but yellow as well. If you see yellow SMTP errors investigate them. However, since you can send mails to other addresses, I think the ability to send/receive from the server can be ruled out. When you say you can use it on other servers, are the configurations identical on all servers in question? Is the problem server recognized in DNS as being able to send receive and is a valid trusted host on the internet?
    – Techie Joe
    Feb 26, 2013 at 16:08
  • No warnings or errors are showed up on the logs. I was doing my research and now I'm suspecting from my SMTP configuration or PHP.ini configuration. I will also post my gmail mail dump on my question.
    – Jas
    Feb 26, 2013 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .