Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can not email using PHP 1

Status
Not open for further replies.

likelylad

IS-IT--Management
Jul 4, 2002
388
GB
I have an Apache Server with php on a Win 2000 Professional PC.
The settings with the php.ini file is as follows
[mail function]
; For Win32 only.
SMTP = 10.76.10.11
smtp_port = 25


The 10.76.10.11 is a different server that has Exchange 5.5 running on it.

I can Telnet into this server using the above specified settings. However I did not test if any command here (mainly because I do not know how to).

When I run the following code:

<?php
$email = &quot;mmouse@disney.com&quot;;
$subject = &quot;Welcome To BAA&quot;;
$message = &quot;Dear Blaa,Thank you for blaa blaa ..more blaas.&quot;;
mail($email,$subject,$message);
?>


I get the following error:
Warning: Server Error in C:\ on line 5

Is the problem with the code or are the setting on one of the servers incorrect.
If it is with the servers then what things can I check.

Thanking you in advance for any help received
 
I gave instructions as to how to send and email using telnet in this thread: thread434-407735

Try that first, and see what errors Exchange is serving up. Exchange could, for example, be requiring SMTP login before it will accept mail. ______________________________________________________________________
TANSTAAFL!
 
Thanks for getting back to me.
The following happened.
I typed in mail from:<me@mydomain.com> [enter]
and I received the following error
500 5.3.3 Unrecognized Command

I then typed in mail from: <me@mydomain.com> [enter]
and I received the following error
503 5.5.2 Send hello first

Where it says me@mydomain.com, I replaced it with a valid address.

Any ideas?????
 
Hi sleipnir214

Done a bit of research on the Hello bit.
And got the thing working.
Thanks for setting me off in the right direction.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top