Seite 2 von 2
Verfasst: 06.03.2003 16:02
von Gast
ich frage mich jetzt allerdings was dies bringen soll, weil die function wird inhaltlich gelöscht, aber irgendwo wird sie ja aufgerufen und dann folgen die nächsten fehlermeldungen ? hat denn niemand eine lösung *hilfe hilfe* *lol*
Verfasst: 06.03.2003 16:04
von Mysteria
Blicke da irgendwie überhaupt nicht durch wo was hingehört ....
Ob wir das noch hinbekommen....ich würde das gerne mal testen also das ist der ganze Rest von der obigen Zeile von mir
Code: Alles auswählen
//
// Send the mail out to the recipients set previously in var $this->address
//
function send()
{
global $phpEx, $phpbb_root_path;
if ( $this->address == NULL )
{
message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__);
}
if ( !$this->parse_email() )
{
return false;
}
//
// Add date and encoding type
//
$universal_extra = "MIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s', time()) . " UT\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\n";
$this->extra_headers = $universal_extra . trim($this->extra_headers);
if ( $this->use_smtp )
{
if ( !defined('SMTP_INCLUDED') )
{
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
}
$result = smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers);
}
else
{
$result = @mail($this->address, $this->subject, $this->msg, $this->extra_headers);
}
if ( !$result )
{
message_die(GENERAL_ERROR, 'Failed sending email :: ' . $result, '', __LINE__, __FILE__);
}
return true;
}
//
// Attach files via MIME.
//
function attachFile($filename, $mimetype = "application/octet-stream", $szFromAddress, $szFilenameToDisplay)
{
global $lang;
$mime_boundary = "--==================_846811060==_";
$this->mailMsg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->mailMsg;
if ($mime_filename)
{
$filename = $mime_filename;
$encoded = $this->encode_file($filename);
}
$fd = fopen($filename, "r");
$contents = fread($fd, filesize($filename));
$this->mimeOut = "--" . $mime_boundary . "\n";
$this->mimeOut .= "Content-Type: " . $mimetype . ";\n\tname=\"$szFilenameToDisplay\"\n";
$this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n";
$this->mimeOut .= "Content-Disposition: attachment;\n\tfilename=\"$szFilenameToDisplay\"\n\n";
if ( $mimetype == "message/rfc822" )
{
$this->mimeOut .= "From: ".$szFromAddress."\n";
$this->mimeOut .= "To: ".$this->emailAddress."\n";
$this->mimeOut .= "Date: ".date("D, d M Y H:i:s") . " UT\n";
$this->mimeOut .= "Reply-To:".$szFromAddress."\n";
$this->mimeOut .= "Subject: ".$this->mailSubject."\n";
$this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n";
$this->mimeOut .= "MIME-Version: 1.0\n";
}
$this->mimeOut .= $contents."\n";
$this->mimeOut .= "--" . $mime_boundary . "--" . "\n";
return $out;
// added -- to notify email client attachment is done
}
function getMimeHeaders($filename, $mime_filename="")
{
$mime_boundary = "--==================_846811060==_";
if ($mime_filename)
{
$filename = $mime_filename;
}
$out = "MIME-Version: 1.0\n";
$out .= "Content-Type: multipart/mixed;\n\tboundary=\"$mime_boundary\"\n\n";
$out .= "This message is in MIME format. Since your mail reader does not understand\n";
$out .= "this format, some or all of this message may not be legible.";
return $out;
}
//
// Split string by RFC 2045 semantics (76 chars per line, end with \r\n).
//
function myChunkSplit($str)
{
$stmp = $str;
$len = strlen($stmp);
$out = "";
while ($len > 0)
{
if ($len >= 76)
{
$out .= substr($stmp, 0, 76) . "\r\n";
$stmp = substr($stmp, 76);
$len = $len - 76;
}
else
{
$out .= $stmp . "\r\n";
$stmp = "";
$len = 0;
}
}
return $out;
}
//
// Split the specified file up into a string and return it
//
function encode_file($sourcefile)
{
if (is_readable(phpbb_realpath($sourcefile)))
{
$fd = fopen($sourcefile, "r");
$contents = fread($fd, filesize($sourcefile));
$encoded = $this->myChunkSplit(base64_encode($contents));
fclose($fd);
}
return $encoded;
}
} // class emailer
?>
[/quote]
Was genau soll jetzt noch stehen

Verfasst: 06.03.2003 16:35
von Gast
Mysteria hat geschrieben:Blicke da irgendwie überhaupt nicht durch wo was hingehört ....
Ob wir das noch hinbekommen....ich würde das gerne mal testen also das ist der ganze Rest von der obigen Zeile von mir
Code: Alles auswählen
//
// Send the mail out to the recipients set previously in var $this->address
//
function send()
{
return true; <- dies eventuell mal stehenlassen, damit der aufruf etwas zurückgibt an den aufrufenden :)
}
//
// Attach files via MIME.
//
function attachFile($filename, $mimetype = "application/octet-stream", $szFromAddress, $szFilenameToDisplay)
{
global $lang;
$mime_boundary = "--==================_846811060==_";
$this->mailMsg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset="" . $lang['ENCODING'] . ""\n\n" . $this->mailMsg;
if ($mime_filename)
{
$filename = $mime_filename;
$encoded = $this->encode_file($filename);
}
$fd = fopen($filename, "r");
$contents = fread($fd, filesize($filename));
$this->mimeOut = "--" . $mime_boundary . "\n";
$this->mimeOut .= "Content-Type: " . $mimetype . ";\n\tname="$szFilenameToDisplay"\n";
$this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n";
$this->mimeOut .= "Content-Disposition: attachment;\n\tfilename="$szFilenameToDisplay"\n\n";
if ( $mimetype == "message/rfc822" )
{
$this->mimeOut .= "From: ".$szFromAddress."\n";
$this->mimeOut .= "To: ".$this->emailAddress."\n";
$this->mimeOut .= "Date: ".date("D, d M Y H:i:s") . " UT\n";
$this->mimeOut .= "Reply-To:".$szFromAddress."\n";
$this->mimeOut .= "Subject: ".$this->mailSubject."\n";
$this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n";
$this->mimeOut .= "MIME-Version: 1.0\n";
}
$this->mimeOut .= $contents."\n";
$this->mimeOut .= "--" . $mime_boundary . "--" . "\n";
return $out;
// added -- to notify email client attachment is done
}
function getMimeHeaders($filename, $mime_filename="")
{
$mime_boundary = "--==================_846811060==_";
if ($mime_filename)
{
$filename = $mime_filename;
}
$out = "MIME-Version: 1.0\n";
$out .= "Content-Type: multipart/mixed;\n\tboundary="$mime_boundary"\n\n";
$out .= "This message is in MIME format. Since your mail reader does not understand\n";
$out .= "this format, some or all of this message may not be legible.";
return $out;
}
//
// Split string by RFC 2045 semantics (76 chars per line, end with \r\n).
//
function myChunkSplit($str)
{
$stmp = $str;
$len = strlen($stmp);
$out = "";
while ($len > 0)
{
if ($len >= 76)
{
$out .= substr($stmp, 0, 76) . "\r\n";
$stmp = substr($stmp, 76);
$len = $len - 76;
}
else
{
$out .= $stmp . "\r\n";
$stmp = "";
$len = 0;
}
}
return $out;
}
//
// Split the specified file up into a string and return it
//
function encode_file($sourcefile)
{
if (is_readable(phpbb_realpath($sourcefile)))
{
$fd = fopen($sourcefile, "r");
$contents = fread($fd, filesize($sourcefile));
$encoded = $this->myChunkSplit(base64_encode($contents));
fclose($fd);
}
return $encoded;
}
} // class emailer
?>
Was genau soll jetzt noch stehen

[/quote]
dies dürfte dann laut deiner aussage stehenbleiben... versuch es mal mit und ohne den return wert, ich denke ohne return würde wieder eine fehlermeldung auftauchen

tri
Verfasst: 07.03.2003 11:46
von Gast
hola mysteria,
schon getestet ?
Verfasst: 07.03.2003 12:39
von Mysteria
Grüss dich,
mit Spaceb. hab ich es aufgegeben, hab mich kurzerhand für kostenpflichtigen Webspace entschlossen und es läuft im Moment bestens

Keine doofen Fehler mehr und mit dem Mailserver läuft auch alles bestens ....
Die 2 € im Monat sind es mir Wert
Alles Liebe
Mysteria
Ui
Verfasst: 07.03.2003 14:58
von Gast
Welcher Anbieter ? 2€ ist ja interessant.
Wie lautet denn die url deines Forums ?