I'm trying to use SMTP on Exchange server 2003 within a network on 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.
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
I have granted relay permissions to the machine on exchange server. SMTP service running on XP machine.
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