2 Replies - 2478 Views - Last Post: 13 December 2007 - 09:07 PM Rate Topic: -----

#1 jilong  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 33
  • Joined: 17-May 07

can php mail form run in window server?

Posted 13 December 2007 - 04:16 AM

I had created my demo site in linux server, this site were come with few php email form, it work nicely in my demo site.

When i publish it in live site, window server, the server was support php, so i think is ok to bring over the php mail form,

but i face a problem to sent email.
It seem like the form only able to sent email to .com mail address,
if i set the form sent to .net or country email address, i wont receive,
if i set the form sent to domain.com or yahoo.com, i received,

abc@domain.com (received)
abc@domain.net (not received)
abc@domain.com.sg (not received)


Below are the code i using.

Is it the asp form is my only choice? or can i just do some change in my php form to run in window server?

<?
$fullname = $_POST['fullname'];
$msg = $_POST['msg'];

?>

<?php
if ($_SERVER['REQUEST_METHOD']=="POST"){

   $to="abc@domain.net";
   $cc="abc@domain.com";
   $subject = "Online Order"; 

   $headers = 
   "From: $fullname\r\n" .
   "cc: $cc\r\n" .
   "MIME-Version: 1.0\r\n" .
   "Content-Type: multipart/mixed;\r\n" .
   " boundary=\"{$mime_boundary}\"";

   $message="
<table cellpadding='0' cellspacing='0' border='0'>
<tr><td><b>$fullname,</b></td></tr>
<tr><td>$msg</td></tr>
</table>
 ";

   if (@mail($to, $subject, $message, $headers))

} else {

<form> </form>

<?php } ?>


Is This A Good Question/Topic? 0
  • +

Replies To: can php mail form run in window server?

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5303
  • View blog
  • Posts: 27,188
  • Joined: 10-May 07

Re: can php mail form run in window server?

Posted 13 December 2007 - 07:10 AM

Within your php.ini configuration file you will find the mail settings. There are specific comments within the file in regards to using the mail function on a windows server.

Also, have a look here:
http://www.php.net/m...en/ref.mail.php
Was This Post Helpful? 0
  • +
  • -

#3 henimex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 13-December 07

Re: can php mail form run in window server?

Posted 13 December 2007 - 09:07 PM

:D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1