PHP MAIL on Apache and Windows Server 2003
- From: huntedsnark <maharg@xxxxxxxxxxxx>
- Date: 20 Apr 2007 11:51:00 -0700
I am at my wits end here, I am trying to get PHP's mail function send
mail correctly but no matter what I do it doesn't seem to work.
We can send mail from an email client on the server just fine, and the
relay and usage persmissions are all correct.
We are running the SMTP sever under Windows and are running PHP
through Apache the PHP.ini file is setup as follows:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 110
; For Win32 only.
sendmail_from = admin@ouremailaddress
-----------------------------------------------------------------
Port 110 is correct for our SMTP server, and the firewall is properly
configured but from some reason mail never gets sent, and it's not
being caught by the spam filter or anything like that.
I'm using this bit of code to test it:
<?PHP
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to="me@ouremail";
// Your subject
$subject="Test";
// From
$header="from: my name <myemail>";
// Your message
$message="Hello \r\n";
$message.="This is test\r\n";
$message.="Test again ";
// send email
$sentmail = mail($to,$subject,$message,$header);
// if your email succesfully sent
if($sentmail){
echo "Email Has Been Sent .";
}
else {
echo "Cannot Send Email ";
}
?>
---------------------------------------------------------------------------------------
It seems to work correctly showing me that the mail has been sent, but
nothing happens.
Any help would be appreciated.
.
- Follow-Ups:
- Re: PHP MAIL on Apache and Windows Server 2003
- From: huntedsnark
- Re: PHP MAIL on Apache and Windows Server 2003
- Prev by Date: Re: [PHP] PHP & Text Messaging
- Next by Date: Re: PHP MAIL on Apache and Windows Server 2003
- Previous by thread: Problem with characters
- Next by thread: Re: PHP MAIL on Apache and Windows Server 2003
- Index(es):
Relevant Pages
|