Jump to content

PHP Mail on Windows Server 2003


Sid9678

Recommended Posts

I Installed PHP version 5.2.3 on my Windows Server 2003 machine. PHP is working, my server is serving php pages. I cannot get my php mail page to work. It does not send e-mail. I do have SMTP installed on my server and I can send e-mail but the php page is not sending the e-mail. I'm getting the following error message: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in C:\Inetpub\phpmail.images4kids.com\mailtest.php on line 43

 

Can someone please help me get this resolved?

Link to comment
https://forums.phpfreaks.com/topic/151061-php-mail-on-windows-server-2003/
Share on other sites

  • 2 weeks later...

Hello ...

i'm just new in php. here's what i find at http://id2.php.net/manual/en/book.mail.php.

 

thx to these guy.

 

======================================

 

To test PHP's mail function, utilized the below :

 

<?php

 

$Name = "Da Duder"; //senders name

$email = "[email protected]"; //senders e-mail adress

$recipient = "[email protected]"; //recipient

$mail_body = "The text for the mail..."; //mail body

$subject = "Subject for reviever"; //subject

$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

 

mail($recipient, $subject, $mail_body, $header); //mail command :)

?>

 

If did not work ... try this.

 

<?php

 

$Name = "Da Duder"; //senders name

$email = "[email protected]"; //senders e-mail adress

$recipient = "[email protected]"; //recipient

$mail_body = "The text for the mail..."; //mail body

$subject = "Subject for reviever"; //subject

$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

 

ini_set('sendmail_from', '[email protected]'); //Suggested by "Some Guy"

 

mail($recipient, $subject, $mail_body, $header); //mail command :)

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.