$mail->WordWrap = 50; // Set word wrap to 50 characters
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = ‚Here is the subject‘;
$mail->Body = ‚This is the HTML message body in bold!‘;
$mail->AltBody = ‚This is the body in plain text for non-HTML mail clients‘;
if(!$mail->send()) {
echo ‚Message could not be sent.‘;
echo 'Mailer Error: ’ . $mail->ErrorInfo;
exit;
}
echo ‚Message has been sent‘;
?>[/PHP]
Keine PHP Fehler, es gibt die Ausgabe „Message has been sent“ - Aber ich bekomme keine Mail
Ähm, wo kommt denn die PHPMailerAutoload.php her? Die habe ich überhaupt nicht. Eigentlich braucht man die class.phpmailer.php, class.smtp.php und noch language/phpmailer.lang-de.php
Schreibe mal an den Anfang des Scriptes diese Zeilen:
[php]
error_reporting(E_ALL);
ini_set(„display_errors“, true);
[/php]
<?php
require 'includes/class.phpmailer.php';
$mail = new PHPMailer;
$mail->PluginDir = "./includes/";
$mail->setLanguage("de");
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'mail.server.de';
$mail->Username = 'ich@server.de';
$mail->Password = 'xxxxxx';
$mail->From = 'name@server.de';
$mail->FromName = 'bdt600';
$mail->addAddress('meine@email.de');
$mail->WordWrap = 50;
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body in bold!';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
}
echo 'Message has been sent';
?>
<?php
error_reporting(E_ALL);
ini_set("display_errors", true);
require 'class.phpmailer.php';
$mail = new PHPMailer;
$mail->setLanguage("de");
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'xxx.com';
$mail->Username = 'xxx';
$mail->Password = 'xxx';
$mail->From = 'noreply@xxx.de';
$mail->FromName = 'xxx Support';
$mail->addAddress('xxx@live.de');
$mail->WordWrap = 50;
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body in bold!';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
}
echo 'Message has been sent';
?>
Und wieder nichts:
[PHP]<?php
error_reporting(E_ALL);
ini_set("display_errors", true);
require 'class.phpmailer.php';
$mail = new PHPMailer;
$mail->setLanguage("de");
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'smtp.web.de';
$mail->Username = 'lalobjac@web.de';
$mail->Password = 'xxx';
$mail->From = 'lalobjac@web.de';
$mail->FromName = 'xxx Support';
$mail->addAddress('xxx');
$mail->WordWrap = 50;
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body in bold!';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
}
echo 'Message has been sent';
?>[/PHP]
$mail->WordWrap = 50; // Set word wrap to 50 characters
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = ‚Here is the subject‘;
$mail->Body = ‚This is the HTML message body in bold!‘;
$mail->AltBody = ‚This is the body in plain text for non-HTML mail clients‘;
if(!$mail->send()) {
echo ‚Message could not be sent.‘;
echo 'Mailer Error: ’ . $mail->ErrorInfo;
exit;
}
echo ‚Message has been sent‘;
?>[/PHP]
Ausgabe wie immer, wurde angeblich gesendet, kommt aber nichts.