wie kann ich mit einem php scirpt emails versenden ?
danke fuer die hilfe
ps. es eilt.
danke fuer die hilfe
ps. es eilt.
<?php
/* Empfänger */
$empfaenger = array("Damir<mail@selfphp.com>");
/* Empfänger CC */
$empfaengerCC = array("Damir CC<mail@selfphp.com>");
/* Empfänger BCC */
$empfaengerBCC = array("Damir BCC<mail@selfphp.com>");
/* Absender */
$absender = "Administrator SELFPHP<selfphp@selfphp.com>";
/* Rueckantwort */
$reply = "Administrator SELFPHP<selfphp@selfphp.com>";
/* Betreff */
$subject = "Info Mail von SELFPHP";
/* Nachricht */
$message = '
<html>
<head>
<title>SELFPHP - Mail Beispiel</title>
</head>
<body>
<table width="214" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47">PHP5</td>
<td width="56"></td>
<td width="99"></td>
</tr>
<tr>
<td></td>
<td>SELFPHP</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>www.selfphpfriend.de</td>
</tr>
</table>
</body>
</html>
';
/* Baut Header der MAil zusammen */
$headers .= "From:" . $absender . "\n";
$headers .= "Reply-To:" . $reply . "\n";
$headers .= "X-Mailer: PHP/" . phpversion(). "\n";
$headers .= "X-Sender-IP: $REMOTE_ADDR\n";
$headers .= "Content-type: text/html\n";
// Extrahiere Emailadressen
$empfaengerString = implode(",",$empfaenger);
$empfaengerCCString = implode(",",$empfaengerCC);
$empfaengerBCCString = implode(",",$empfaengerBCC);
$headers .= "Cc: " . $empfaengerCCString . "\n";
$headers .= "Bcc: " . $empfaengerBCCString . "\n";
/* Verschicken der Mail */
mail($empfaengerString, $subject, $message, $headers);
?>
Kommentar