Compare commits
5 Commits
67a39afe0f
...
productive
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
560ef6589c | ||
|
|
e4a21f4d7c | ||
|
|
c2e488c8e7 | ||
|
|
59b5ffc82f | ||
|
|
2913f3f032 |
@@ -6,5 +6,6 @@ include_once ('string.php');
|
|||||||
include_once ('numbers.php');
|
include_once ('numbers.php');
|
||||||
include_once ('mail.php');
|
include_once ('mail.php');
|
||||||
include_once ('debug.php');
|
include_once ('debug.php');
|
||||||
|
include_once ('troy-api.php');
|
||||||
// include_once ('markdown.php');
|
// include_once ('markdown.php');
|
||||||
?>
|
?>
|
||||||
15
mail.php
15
mail.php
@@ -58,29 +58,19 @@ function send_html_mail($an, $betreff, $text, $ok = '', $error = '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
|
function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||||
$boundary = md5($an.$betreff.$text.time());
|
global $_sendermail;
|
||||||
include 'secret.php';
|
|
||||||
$sender = 'noreply@troy-grunt.de';
|
$sender = 'noreply@troy-grunt.de';
|
||||||
if (isset ( $_sendermail )) {
|
if (isset ( $_sendermail )) {
|
||||||
$sender = $_sendermail;
|
$sender = $_sendermail;
|
||||||
}
|
}
|
||||||
include 'php-mailer/SMTP.php';
|
|
||||||
include 'php-mailer/PHPMailer.php';
|
include 'php-mailer/PHPMailer.php';
|
||||||
$mail = new PHPMailer();
|
$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->setFrom($sender);
|
||||||
$mail->addAddress($an);
|
$mail->addAddress($an);
|
||||||
$mail->Subject = $betreff;
|
$mail->Subject = $betreff;
|
||||||
$mail->msgHTML('<html><body>'.$text.'</body></html>');
|
$mail->msgHTML($text, __DIR__);
|
||||||
$mail->AltBody = strip_tags($text);
|
$mail->AltBody = strip_tags($text);
|
||||||
//$mail->addAttachment('images/phpmailer_mini.png');
|
|
||||||
|
|
||||||
if (!$mail->send()) {
|
if (!$mail->send()) {
|
||||||
echo 'Mailer Error: ' . $mail->ErrorInfo;
|
echo 'Mailer Error: ' . $mail->ErrorInfo;
|
||||||
@@ -88,5 +78,4 @@ function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
|
|||||||
echo 'Message sent!';
|
echo 'Message sent!';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user