Hallo
witzig ich kann hier nicht wirklich was finden, das einen "SeitenKontakt" oder "false" als Absenderadresse verursacht
function icmail ($mail, $bet, $txt, $from = '', $html = false) {
global $allgAr;
include_once('include/includes/class/phpmailer/class.phpmailer.php');
$mailer = new PHPMailer();
if (empty($from)) {
$mailer->From = $allgAr['adminMail'];
$mailer->FromName = $allgAr['allg_default_subject'];
} elseif ( preg_match('%(.*) <([\w\.-]*@[\w\.-]*)>%i', $from, $tmp) ) {
$mailer->From = trim($tmp[2]);
$mailer->FromName = trim($tmp[1]);
} elseif (preg_match('%([\w\.-]*@[\w\.-]*)%i', $from, $tmp)) {
$mailer->From = trim($tmp[1]);
$mailer->FromName = '';
}
if ($allgAr['mail_smtp']) { //SMTP Versand
$smtpser = @db_result(db_query('SELECT `t1` FROM `prefix_allg` WHERE `k` = "smtpconf"'));
if (empty($smtpser)) {
echo '<span style="font-size: 2em; color: red;">Mailversand muss konfiguriert werden!</span><br />';
} else {
$smtp = unserialize($smtpser);
$mailer->IsSMTP();
$mailer->Host = $smtp['smtp_host'];
$mailer->SMTPAuth = ($smtp['smtp_auth'] == 'no' ? false : true);
if ($smtp['smtp_auth'] == 'ssl' or $smtp['smtp_auth'] == 'tls') {
$mailer->SMTPSecure = $smtp['smtp_auth'];
}
if (!empty($smtp['smtp_port'])) {
$mailer->Port = $smtp['smtp_port'];
}
$mailer->AddReplyTo($mailer->From, $mailer->FromName);
if ($smtp['smtp_changesubject'] and $mailer->From != $smtp['smtp_email']) {
$bet = '(For ' .$mailer->FromName . ' - '. $mailer->From .') '. $bet;
$mailer->From = $smtp['smtp_email'];
}
$mailer->Username = $smtp['smtp_login'];
require_once('include/includes/class/AzDGCrypt.class.inc.php');
$cr64 = new AzDGCrypt(DBDATE.DBUSER.DBPREF);
$mailer->Password = $cr64->decrypt($smtp['smtp_pass']);
if ($smtp['smtp_pop3beforesmtp'] == 1) {
$pop = new POP3();
$pop3port = !empty($smpt['smtp_pop3port']) ? $smpt['smtp_pop3port'] : 110;
$pop->Authorise($smpt['smtp_pop3host'], $pop3port, 5, $mailer->Username, $mailer->Password, 1);
}
}
//$mailer->SMTPDebug = true;
}
if (is_array($mail)) {
if ($mail[0] != 'bcc') {
array_shift($mail);
foreach ($mail as $m){
$mailer->AddBCC(escape_for_email($m));
}
$mailer->AddAddress($mailer->From);
} else {
foreach ($mail as $m){
$mailer->AddAddress(escape_for_email($mail));
}
}
} else {
$mailer->AddAddress(escape_for_email($mail));
}
$mailer->Subject = escape_for_email($bet, true);
$txt = str_replace("\r", "\n", str_replace("\r\n", "\n", $txt));
if ($html) {
$mailer->IsHTML(true);
$mailer->AltBody = strip_tags($txt);
}
$mailer->Body = $txt;
if ($mailer->Send()) {
return true;
} else {
if (is_coadmin()) {
echo "<h2 style=\"color:red;\">Mailer Error: " . $mailer->ErrorInfo . '</h2>';
}
return false;
}
}
function html_enc_substr($text, $start, $length) {
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return(htmlentities(substr(strtr($text, $trans_tbl), $start, $length)));
}
function get_datum ($d) {
if (strpos($d,'.') !== FALSE) { $d = str_replace('.','-',$d); }
if (strpos($d,'/') !== FALSE) { $d = str_replace('/','-',$d); }
if (is_numeric(substr($d,-4))) {
list($t,$m,$j) = explode('-', $d);
} elseif (is_numeric(substr($d,0,4))) {
list($j,$m,$t) = explode('-', $d);
}
$d = $j.'-'.$m.'-'.$t;
return ($d);
}
und das ist aus dem class.phpmailer.php wenn das von Bedeutung ist.
/**
* Sets the From email address for the message.
* @var string
*/
var $From = 'root@localhost';
/**
* Sets the From name of the message.
* @var string
*/
var $FromName = 'Root User';
/**
* Sets the Sender email (Return-Path) of the message. If not empty,
* will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
* @var string
*/
var $Sender = '';
Zuletzt modifiziert von snowwhite am 20.04.2010 - 14:57:36
98% der Menschheit ist bescheuert, ich gehöre zu den anderen 3%