'.$text.''."\n\n"; if (mail ( $an, $betreff, $content, $header ) === true) { echo $ok; } else { echo $error; } } function send_php_mail($an, $betreff, $text, $ok = '', $error = '') { $boundary = md5($an.$betreff.$text.time()); include 'secret.php'; $sender = 'noreply@troy-grunt.de'; if (isset ( $_sendermail )) { $sender = $_sendermail; } include 'php-mailer/SMTP.php'; include 'php-mailer/PHPMailer.php'; $mail = new PHPMailer(); $mail->isSMTP(); $mail->SMTPDebug = SMTP::DEBUG_OFF; $mail->Host = $_smtp['srv']; $mail->Port = 25; $mail->SMTPAuth = true; $mail->Username = $_smtp['user']; $mail->Password = $_smtp['pw']; $mail->setFrom($sender); $mail->addAddress($an); $mail->Subject = $betreff; $mail->msgHTML(''.$text.''); $mail->AltBody = strip_tags($text); //$mail->addAttachment('images/phpmailer_mini.png'); if (!$mail->send()) { echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message sent!'; } } ?>