Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Slanje maila sa Windows servera

[es] :: PHP :: Slanje maila sa Windows servera

[ Pregleda: 2345 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

DeX-Force
Beograd

Član broj: 37831
Poruke: 324



Profil

icon Slanje maila sa Windows servera08.03.2005. u 16:58 - pre 232 meseci
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.
 
Odgovor na temu

SmilieBG
Aleksandar Skodric
NL

Član broj: 13094
Poruke: 1821
*.speed.planet.nl.



+3 Profil

icon Re: Slanje maila sa Windows servera08.03.2005. u 17:25 - pre 232 meseci
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
=========
Uporedi cene i karakteristike za vise od 10.000 proizvoda, izmedju ostalog:
Digitalni foto-aparati
Mobilni telefoni
Skolski pribor
=========
 
Odgovor na temu

DeX-Force
Beograd

Član broj: 37831
Poruke: 324



Profil

icon Re: Slanje maila sa Windows servera09.03.2005. u 10:17 - pre 231 meseci
Mislim da to nema veze, probao sam i jedno i drugo. :(
 
Odgovor na temu

[es] :: PHP :: Slanje maila sa Windows servera

[ Pregleda: 2345 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.