5 Commits

Author SHA1 Message Date
electronicfreak
560ef6589c add troy api 2024-04-04 19:53:41 +02:00
troy
e4a21f4d7c mail absender 2022-12-18 19:29:34 +01:00
troy
c2e488c8e7 added functional php mail 2022-12-18 19:04:18 +01:00
troy
59b5ffc82f mail return werte gesetzt 2022-11-12 11:25:42 +01:00
troy
2913f3f032 mail boundary auskommentiert 2022-11-12 11:22:56 +01:00
2 changed files with 3 additions and 13 deletions

View File

@@ -6,5 +6,6 @@ include_once ('string.php');
include_once ('numbers.php');
include_once ('mail.php');
include_once ('debug.php');
include_once ('troy-api.php');
// include_once ('markdown.php');
?>

View File

@@ -58,29 +58,19 @@ function send_html_mail($an, $betreff, $text, $ok = '', $error = '') {
}
function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
$boundary = md5($an.$betreff.$text.time());
include 'secret.php';
global $_sendermail;
$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('<html><body>'.$text.'</body></html>');
$mail->msgHTML($text, __DIR__);
$mail->AltBody = strip_tags($text);
//$mail->addAttachment('images/phpmailer_mini.png');
if (!$mail->send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
@@ -88,5 +78,4 @@ function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
echo 'Message sent!';
}
}
?>