Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> PHP + mail w formacie HTML
piterqs
post 9.05.2002, 17:17:41
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 9.05.2002
Skąd: Stargard

Ostrzeżenie: (0%)
-----


Jak wyslac maila z php w formacie html?
Go to the top of the page
+Quote Post
olus
post 9.05.2002, 17:23:52
Post #2





Grupa: Zarejestrowani
Postów: 78
Pomógł: 0
Dołączył: 30.03.2002
Skąd: SANOK

Ostrzeżenie: (0%)
-----


Kod
/* adresaci */

$to  = "Mary <mary@example.com>" . ", "; //zwróc uwagę na przecinek

$to .= "Kelly <kelly@example.com>";



/* temat */

$subject = "Birthday Reminders for August";



/* wiadomość */

$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>

  <td>Sally</td><td>17th</td><td>August</td><td>1973</td>

</tr>

</table>

</body>

</html>

';



/* *******************************************

A TU JEST JAK WYSŁAĆ MAILA W HTML'owym formacie

*********************************************** */



/* Aby wysłać e-mail w foramcie HTML, należy ustawić nagłówek Content-type. */

$headers  = "MIME-Version: 1.0rn";

$headers .= "Content-type: text/html; charset=iso-8859-1rn";



/* dodatkowe nagłówki */

$headers .= "From: Birthday Reminder <birthday@example.com>rn";



$headers .= "Cc: birthdayarchive@example.comrn";

$headers .= "Bcc: birthdaycheck@example.comrn";



/* a teraz wyślij */

mail($to, $subject, $message, $headers);


Cytat
DOBRA JA TO TEŻ NAPISZE patrzcie czasami qurwa do MANUALA
Go to the top of the page
+Quote Post
wool
post 9.05.2002, 21:01:47
Post #3





Grupa: Zarejestrowani
Postów: 148
Pomógł: 0
Dołączył: 4.04.2002
Skąd: starachowice

Ostrzeżenie: (0%)
-----


...
$headers = "MIME-Version: 1.0rn";
$headers .= "Content-type: text/html; charset=iso-8859-1rn";

/* dodatkowe nagłówki */
$headers .= "From: Birthday Reminder <birthday@example.com>rn";

olus jesteś pewien że nagłówki w taki sposób zostaną dobrze wysłane ? Robiłem coś podobnego i przesłana została tyko jesdna, ostatnia zmienna $headers. Dopiero jak przerobiłem to w jedną zmienną poszło OK.
Go to the top of the page
+Quote Post
em1X
post 9.05.2002, 21:47:41
Post #4





Grupa: Zarejestrowani
Postów: 984
Pomógł: 41
Dołączył: 16.03.2002
Skąd: Płock

Ostrzeżenie: (0%)
-----


mail ($do_kogo, $temat, $tresc_majla, "From: twoj@mail.plnContent-type: text/html");

tongue.gif


--------------------
eh, co polska wódka to polska wódka
Go to the top of the page
+Quote Post
steru
post 9.05.2002, 22:39:07
Post #5





Grupa: Zarejestrowani
Postów: 107
Pomógł: 0
Dołączył: --
Skąd: Krakow

Ostrzeżenie: (0%)
-----


Cytat
...
$headers = "MIME-Version: 1.0rn";
$headers .= "Content-type: text/html; charset=iso-8859-1rn";

/* dodatkowe nagłówki */
$headers .= "From: Birthday Reminder <birthday@example.com>rn";

olus jesteś pewien że nagłówki w taki sposób zostaną dobrze wysłane ? Robiłem coś podobnego i przesłana została tyko jesdna, ostatnia zmienna $headers. Dopiero jak przerobiłem to w jedną zmienną poszło OK.

dobrzzz bedzie
Go to the top of the page
+Quote Post
olus
post 10.05.2002, 10:08:59
Post #6





Grupa: Zarejestrowani
Postów: 78
Pomógł: 0
Dołączył: 30.03.2002
Skąd: SANOK

Ostrzeżenie: (0%)
-----


tak napisano w manualu


chyba ze ty korzystales z CZESKIEJ wersjii manuala ja tam nie wiem... laugh.gif angrysmiley.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 23.07.2025 - 06:31