source: www/manuals/PHP_manual/function.mail.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 5.3 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>mail</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="Mailové funkce"
13HREF="ref.mail.html"><LINK
14REL="PREVIOUS"
15TITLE="ezmlm_hash"
16HREF="function.ezmlm-hash.html"><LINK
17REL="NEXT"
18TITLE="mailparse functions"
19HREF="ref.mailparse.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="refentry"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="function.ezmlm-hash.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57></TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="ref.mailparse.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><H1
73><A
74NAME="function.mail"
75></A
76>mail</H1
77><DIV
78CLASS="refnamediv"
79><A
80NAME="AEN39922"
81></A
82><P
83> (PHP 3, PHP 4 )</P
84>mail&nbsp;--&nbsp;send mail</DIV
85><DIV
86CLASS="refsect1"
87><A
88NAME="AEN39925"
89></A
90><H2
91>Popis</H2
92>bool <B
93CLASS="methodname"
94>mail</B
95> ( string to, string subject, string message [, string additional_headers])<BR
96></BR
97><P
98>&#13; <B
99CLASS="function"
100>mail()</B
101> automaticky odmailuje vzkaz specifikovaný v
102 <TT
103CLASS="parameter"
104><I
105>message</I
106></TT
107> pøíjemci specifikovanému v
108 <TT
109CLASS="parameter"
110><I
111>to</I
112></TT
113>. Pøidáním èárky mezi adresami v
114 <TT
115CLASS="parameter"
116><I
117>to</I
118></TT
119> mù¾ete specifikovat více pøíjemcù.
120 </P
121><P
122>&#13; <TABLE
123WIDTH="100%"
124BORDER="0"
125CELLPADDING="0"
126CELLSPACING="0"
127CLASS="EXAMPLE"
128><TR
129><TD
130><DIV
131CLASS="example"
132><A
133NAME="AEN39948"
134></A
135><P
136><B
137>Pøíklad 1. Odeslání mailu.</B
138></P
139><TABLE
140BORDER="0"
141BGCOLOR="#E0E0E0"
142CELLPADDING="5"
143><TR
144><TD
145><PRE
146CLASS="programlisting"
147>mail("rasmus@lerdorf.on.ca", "Mùj pøedmìt", "Øádek 1\nØádek 2\nØádek 3");</PRE
148></TD
149></TR
150></TABLE
151></DIV
152></TD
153></TR
154></TABLE
155>
156 </P
157><P
158>&#13; Pokud je pøedán ètvrtý argument, jeho hodnota se vlo¾í na konec hlavièek.
159 Toto se obvykle pou¾ívá k pøidání extra hlavièek.
160 Vícenásobné hlavièky se oddìlují zaøádkováním.
161 </P
162><P
163>&#13; <TABLE
164WIDTH="100%"
165BORDER="0"
166CELLPADDING="0"
167CELLSPACING="0"
168CLASS="EXAMPLE"
169><TR
170><TD
171><DIV
172CLASS="example"
173><A
174NAME="AEN39953"
175></A
176><P
177><B
178>Pøíklad 2. Odeslání mailu s extra hlavièkami.</B
179></P
180><TABLE
181BORDER="0"
182BGCOLOR="#E0E0E0"
183CELLPADDING="5"
184><TR
185><TD
186><PRE
187CLASS="programlisting"
188>mail("nobody@aol.com", "pøedmìt", $message,
189 "From: webmaster@$SERVER_NAME\nReply-To: webmaster@$SERVER_NAME\nX-Mailer: PHP/" . phpversion());</PRE
190></TD
191></TR
192></TABLE
193></DIV
194></TD
195></TR
196></TABLE
197>
198 K vytvoøení komplexních emailù mù¾ete také pou¾ít pomìrnì jednoduché techniky
199 pro tvorbu øetìzcù.
200 <TABLE
201WIDTH="100%"
202BORDER="0"
203CELLPADDING="0"
204CELLSPACING="0"
205CLASS="EXAMPLE"
206><TR
207><TD
208><DIV
209CLASS="example"
210><A
211NAME="AEN39956"
212></A
213><P
214><B
215>Pøíklad 3. Odeslání komplexního emailu</B
216></P
217><TABLE
218BORDER="0"
219BGCOLOR="#E0E0E0"
220CELLPADDING="5"
221><TR
222><TD
223><PRE
224CLASS="programlisting"
225>/* recipients */
226$recipient .= "Mary &#60;mary@u.college.edu&#62;" . ", " ; //v¹imnìte si èárky
227$recipient .= "Kelly &#60;kelly@u.college.edu&#62; . ", ";
228$recipient .= "ronabop@php.net";
229
230/* subject */
231$subject = "Birthday Reminders for August";
232
233/* message */
234$message .= "Následující email obsahuje formátovanou ASCII tabulku\n";
235$message .= "Day \t\tMonth \t\tYear\n";
236$message .= "3rd \t\tAug \t\t1970\n";
237$message .= "17rd\t\tAug \t\t1973\n";
238
239/* mù¾ete pøidat signaturu */
240$message .= "--\r\n"; //oddìlovaè signatury
241$message .= "Birthday reminder copylefted by public domain";
242
243/* dodateèné hlavièky pro chyby, From, cc, bcc, atd */
244
245$headers .= "From: Birthday Reminder &#60;birthday@php.net&#62;\n";
246$headers .= "X-Sender: &#60;birthday@php.net&#62;\n";
247$headers .= "X-Mailer: PHP\n"; // mailový klient
248$headers .= "X-Priority: 1\n"; // Urgentní vzkaz!
249$headers .= "Return-Path: &#60;birthday@php.net&#62;\n"; // Návratová cesta pro chyby
250
251/* Pokud chcete poslat HTML email, odkomentujte následující øádek */
252// $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime typ
253
254$headers .= "cc:birthdayarchive@php.net\n"; // CC
255$headers .= "bcc:birthdaycheck@php.net, birthdaygifts@php.net\n"; // BCC
256
257/* a teï to ode¹leme */
258mail($recipient, $subject, $message, $headers);</PRE
259></TD
260></TR
261></TABLE
262></DIV
263></TD
264></TR
265></TABLE
266>
267 </P
268></DIV
269><DIV
270CLASS="NAVFOOTER"
271><HR
272ALIGN="LEFT"
273WIDTH="100%"><TABLE
274SUMMARY="Footer navigation table"
275WIDTH="100%"
276BORDER="0"
277CELLPADDING="0"
278CELLSPACING="0"
279><TR
280><TD
281WIDTH="33%"
282ALIGN="left"
283VALIGN="top"
284><A
285HREF="function.ezmlm-hash.html"
286ACCESSKEY="P"
287>Pøedcházející</A
288></TD
289><TD
290WIDTH="34%"
291ALIGN="center"
292VALIGN="top"
293><A
294HREF="index.html"
295ACCESSKEY="H"
296>Domù</A
297></TD
298><TD
299WIDTH="33%"
300ALIGN="right"
301VALIGN="top"
302><A
303HREF="ref.mailparse.html"
304ACCESSKEY="N"
305>Dal¹í</A
306></TD
307></TR
308><TR
309><TD
310WIDTH="33%"
311ALIGN="left"
312VALIGN="top"
313>ezmlm_hash</TD
314><TD
315WIDTH="34%"
316ALIGN="center"
317VALIGN="top"
318><A
319HREF="ref.mail.html"
320ACCESSKEY="U"
321>Nahoru</A
322></TD
323><TD
324WIDTH="33%"
325ALIGN="right"
326VALIGN="top"
327>mailparse functions</TD
328></TR
329></TABLE
330></DIV
331></BODY
332></HTML
333>
Note: See TracBrowser for help on using the repository browser.