[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

PHP TO EXCHANGE SERVER RELAY- SMTP server response: 550 5.7.1

Posted on 2006-04-24
9
Medium Priority
?
800 Views
Last Modified: 2007-12-19
I'm trying to use SMTP on Exchange server (SBS) within a network (XP SP2 machine) to send email (from a PHP/apache setup locally) but keep getting relay errors.  I tried telnet from the machine and that works fine.

I have granted relay permissions to the machine on exchange server.  SMTP service running on XP machine.

I even tried sending mail without @x.local in the address, seems like the mail was sent but it never arrives!!
Any ideas what I'm doing wrong?

PHP Script:
<?
$to = "email1@x.local";
$from = "email2@x.local";
$sub = "My Email";
$msg = "Hello World!";
mail($to, $sub, $msg, "From: ".$from);
?>

Error:
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for
email2@x.local in C:\Program Files\Apache Group\Apache2\htdocs\mail2.php on line 6

php.ini settings:
PHP.ini settings
[mail function]
; For Win32 only.
SMTP = 10.0.0.250
smtp_port = 25

; For Win32 only.
sendmail_from = email2@x.local

0
Comment
Question by:clankk
7 Comments
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 16531117
Can you please post an IPCONFIG /ALL from your server as well as the xp workstation?

Jeff
TechSoEasy
0
 

Author Comment

by:clankk
ID: 16535269
SERVER
******************************
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\server>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : xxxxxxx
   Primary Dns Suffix  . . . . . . . : x.local
   Node Type . . . . . . . . . . . . : Unknown
   IP Routing Enabled. . . . . . . . : Yes
   WINS Proxy Enabled. . . . . . . . : Yes
   DNS Suffix Search List. . . . . . : x.local

Ethernet adapter Server Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
   Physical Address. . . . . . . . . : ------------------
   DHCP Enabled. . . . . . . . . . . : No
   IP Address. . . . . . . . . . . . : 10.0.0.250
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.0.254
   DNS Servers . . . . . . . . . . . : 10.0.0.250
   Primary WINS Server . . . . . . . : 10.0.0.250

C:\Documents and Settings\server>
******************************

XP MACHINE
************************************
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\XP>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : KXP
        Primary Dns Suffix  . . . . . . . : x.local
        Node Type . . . . . . . . . . . . : Hybrid
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : x.local
                                            x.local

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : x.local
        Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Cont
roller
        Physical Address. . . . . . . . . : ---------------------------
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 10.0.0.66
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 10.0.0.254
        DHCP Server . . . . . . . . . . . : 10.0.0.250
        DNS Servers . . . . . . . . . . . : 10.0.0.250
        Primary WINS Server . . . . . . . : 10.0.0.250
        Lease Obtained. . . . . . . . . . : 25 April 2006 08:42:54
        Lease Expires . . . . . . . . . . : 24 June 2006 08:42:54

C:\Documents and Settings\XP>
************************************
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 16539640
Is your DOMAIN NAME really just x.local?  I thought you were using that as an abbreviation.  If it is, really x.local, then it won't resolve over DNS, which requires at least two characters in the domain name.  (Active Directory doesn't mind, it's DNS that does).

http://support.microsoft.com/kb/909264

Jeff
TechSoEasy
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:clankk
ID: 16551307
No, that is not my Domain name! I don't want to put my domain up but it is more than two characters.
0
 

Author Comment

by:clankk
ID: 16555228
Sorted.

Not too techie and it took me sometime to realise that SMTP on the local machine needs to be opened for relay!  I was opening relay on the server!

Thanks anyway.
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16575662
Closed, 400 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0
 

Expert Comment

by:anumularavi
ID: 16636951
i am try to send the mail from php

but server showes the PHP Warning:  mail(): SMTP server response: 550

plese help me any one thanks to all
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've often see, or have been asked, the question about the difference between the Exchange 2010 SP1 version, available as part of Small Business Server (SBS) 2011, and the “normal” Exchange 2010 SP1 Standard. The answer to the question is relativ…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question