![]() |
|
|
| |
|
|
| bool mail(string to, string subject, string message [, string additional_headers]) |
|
|
|
PHP 3, PHP 4 >= 4.0b1 |
|
|
|
Mit mail() kann man eine E-Mail im Text- oder HTML-Format an eine oder Zu Beispiel 1: Zu Beispiel 2: |
|
|
<?PHP <?php
}
else{
$emailbody = '
<html>
<!--
Hallo ' . $name_freund . '
Ihr System unterstuetzt keine HTML-Mails!
Folgende Nachricht wurde Ihnen uebermittelt:
' . $kommentar . '
-->
<body bgcolor="#FFFFFF" text="#000000">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#FFEEDD" >
<b>SELFPHP: Version 1.0.0 , Autor: Damir Enseleit</b>
</td>
</tr>
</table>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#EEEEEE" >
<img src="http://www.selfphp3.de/src/logo.gif" width="106" height="109" border="0" alt="SELFHTML">
</td>
<td bgcolor="#EEEEEE" valign="bottom" width="100%">
Dynamische Webapplikationen:<br>
<b>PHP-Dateien selbst erstellen</b>
<h1>Newsletter</h1>
</td>
</tr>
<tr>
<td bgcolor="#EEEEEE" valign="top" align="center">
<h2>Inhalt</h2>
</td>
<td bgcolor="#FFFFFF" valign="top" width="100%">
<h2>Hallo ' . $name_freund . '</h2>
<p><b>Das ist Deine Nachricht:</b></p>
<pre><font face="Verdana,Geneva,Arial, Helvetica,sans-serif" color="#006600">'
. $kommentar .
'</font></pre>
</td>
</tr>
<tr>
<td colspan=2 bgcolor="#EEEEEE" >
<img src="http://www.selfphp3.de/src/up.gif" width="14" height="10" border="0" alt="nachoben"> 
</td>
</tr>
</table>
<p>© 2001<img src="http://www.selfphp3.de/src/mail.gif" width="15" height="10" border="0" alt="E-Mail">
<a href="mailto:mail@selfphp3.de">Damir Enseleit, mail@selfphp3.de</a></p>
</body>
</html>
';
$header="From:$email_from_name<$email_from_mail>\n"; $header .= "Reply-To: $email_from_mail\n"; $header .= "Bcc: $email_to_bcc\n"; $header .= "X-Mailer: PHP/" . phpversion(). "\n"; $header .= "X-Sender-IP: $REMOTE_ADDR\n"; $header .= "Content-Type: text/html"; mail($email_to,$email_betreff,$emailbody,$header); echo "<p>Sende Email nach: $email_freund<br> Sende Email(BCC) nach: $email_from_mail"; } ?> </body> </html> |
|
|
|
Ausfüllen des Formular:
Bestätigung beim Versenden:
Fertige Email beim Empfänger:
|
|
|
<?PHP |
|
|
|
|
|
| |
| weiter: |
|
| zurück: |
|