mail.php

<?php
function alertmail($strEmail,$strText) {
    $to = $strEmail;
    $subject = "Bahn-Alert";
 
    $message = "<html><head><title>Bahn Alert</title>
    </head><body><h2>Verspätungsalarm</h2><p>".
    nl2br($strText)."</p></body></html>";
 
    // Always set content-type when sending HTML email
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
 
    // More headers
    $headers .= 'From: <user@example.com>' . "\r\n";
    $headers .= 'Cc: user@example.com' . "\r\n";
 
    mail($to,$subject,$message,$headers);
}
?>
  • bahnauskunft_mail.php.txt
  • Zuletzt geändert: 22.02.2018 14:41
  • von whupfeld