Hi,
i placed the php in windows server 2003 manually , set the path in Environmental variables , and place the php.ini file in windows.
Now php works fine in my server sytem.When i write the mail sending code and run that program mail didn't sent.
in my php.ini file consists the
smtp=localhost
smtp_port=25
sendmail_from=m e@localhost.com
In my smtp settings:
Internet Information Services->righclick on default virtual smtp server->properties->Access tab->Relay->add the my system IP address and 127.0.0.1 ip address .
We think there is no problem from smtp settings.Becaus e we run the jsp mail sending in same server machine .It works fine and mail sent .
Here is the php code we have used
Please tell that whats the probelem in that.
i placed the php in windows server 2003 manually , set the path in Environmental variables , and place the php.ini file in windows.
Now php works fine in my server sytem.When i write the mail sending code and run that program mail didn't sent.
in my php.ini file consists the
smtp=localhost
smtp_port=25
sendmail_from=m e@localhost.com
In my smtp settings:
Internet Information Services->righclick on default virtual smtp server->properties->Access tab->Relay->add the my system IP address and 127.0.0.1 ip address .
We think there is no problem from smtp settings.Becaus e we run the jsp mail sending in same server machine .It works fine and mail sent .
Here is the php code we have used
Code:
<?php $to ="email@domain.com"; $subject = "Test Mail"; $message = "hello how are you"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-MSMail-Priority: Normal\n"; $from = "me@example.com"; $headers .= "From: $from"; mail($to,$subject,$message,$headers); ?>
Comment