[ DeX-Force @ 08.03.2005. 16:58 ] @
Zna li neko kako bi ovo trebalo da izgleda kad se salje sa Windows servera?

Ovako pise u PHP helpu

Warning
The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only operates on direct sockets which means a MTA is needed listening on a network socket (which can either on the localhost or a remote machine). Second, the custom headers like From:, Cc:, Bcc: and Date: are not interpreted by the MTA in the first place, but are parsed by PHP. PHP < 4.3 only supported the Cc: header element (and was case-sensitive). PHP >= 4.3 supports all the mentioned header elements and is no longer case-sensitive.


Code:
<?php
/* recipients */
$to  = "[email protected]" . ", " ; // note the comma
$to .= "[email protected]";

/* subject */
$subject = "Birthday Reminders for August";

/* message */
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
  <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
  <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
  <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "To: Mary <[email protected]>, Kelly <[email protected]>\r\n";
$headers .= "From: Birthday Reminder <[email protected]>\r\n";
$headers .= "Cc: [email protected]\r\n";
$headers .= "Bcc: [email protected]\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);
?> 


A ja uopste na razumem sta to treba da se razlikuje.

Ovo radi ali ne salje HTML nego ceo kod kao tekst. A meni treba samo mail sa nekom central european kodnom stranom zbog YU slova i nista vise.
[ SmilieBG @ 08.03.2005. 17:25 ] @
Imao sam slicne probleme. Uglavnom:

$headers .= "Content-Type: text/html\r\n Charset=UTF-8";

je prva razlika koju sam primetio. Druga je sto je kod mene $message u " " a ne u ' ' navodnicima.. :S Ako tu moze biti neke razlike...

Poz,
Sale
[ DeX-Force @ 09.03.2005. 10:17 ] @
Mislim da to nema veze, probao sam i jedno i drugo. :(