Click to See Complete Forum and Search --> : mail() and Exchange Server questions


Anon
06-27-2001, 12:12 AM
I am trying to send mail externally from my SMTP server(exchange 2000) using mail() function.

I have no problem if I send to a internal address (christopher.seidel@jerovsek.si), however if I try to sent to a external address (chrisseidel@hotmail.com) I recieve Warning: Server Error, do I need to authinicate to the exchange server who I am so I can send external e-mail, or is this a different problem?

Thanks



***************sorce code*****************


<?
$header = "From: nobody@home.com\n Reply-To: me@home.com";
$to = "some.one@hotmail.com";
$message = "Lots of text and other stuff";
$subject = "Blah Blah";
$send_result = mail( $to, $subject, $message, $header );
?>




*****************configuration**************
PHP4.04
Exchange 2000
IIS 5.0
open relay(closed)

ame12
06-27-2001, 06:23 AM
Sounds like it may be Exchange configuration. Check the Routing tab of the Internet Mail Service Properties sheet (Do not reroute incoming SMTP mail and Reroute incoming SMTP mail). This is sometimes the way that Exchange will control whether you can send outside/inside. To verify whether it is Exchange use another SMTP client, like Eudoria, and see if it has the same problem.

RW


===========================================
http://badblue.com
Small footprint P2P web server for Windows,
Share files, get PHP up and running fast...
===========================================

Anon
11-08-2001, 02:26 AM
I can tell you what to do for Win2000 w/Exchange to get this to work...

I just got it solved myself...

1. In IE type: file:///C:/WinNT/Help/mail.chm
2. Expand 'How to...'
3. Expand 'Set Security Options'
4. Select 'Setting or Removing Relay Restrictions from a Virtual Server'
5. Follow the instructions for relaying.


*note - I restricted relaying except from the ip of my web server. I do not require it to autheticate, therefore, it is able o relay mail outside the network. This keeps the spammers from using my server as a gateway while allowing my web server to send mail. I block incoming ports for mail from reaching my server... so theoretically no spamming.. if anyone sees a problem with this solution please let me know.