Bonjour,
Pour un site hébergé chez 1and1 ... en mode mutualisé
J ai telechargé phpmailer sur ce lien
J ai décompressé et mis le dossier PHPMailer-FE_v4.11 a la racine du site
Je fais appel a PHPMailer de la manière suivante:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| require "PHPMailer-FE_v4.11/_lib/class.phpmailer.php";
$mail = new PHPmailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host='auth.smtp.1and1.fr';
$mail->From='monmail@yahoo.fr';
$mail->AddAddress(' monmail@yahoo.fr');
//$mail->AddReplyTo('votre@adresse');
$mail->Subject='...: PROJET CLIENT (' . $nom_fp . ' ' . $prenom_fp . ')';
$mail->Body='<html><body><center><font size=8> ' . $descriptif_fp . ' </font><br></body></html>';
//$mail->AddAttachment('chemin_fichier/fichier');
if(!$mail->Send()){
echo $mail->ErrorInfo;
}
else{
echo 'Mail envoyé avec succès';
}
$mail->SmtpClose();
unset($mail); |
Message d'erreur:
Warning: include_once(class.smtp.php): failed to open stream: No such file or directory in C:\wamp\www\...\PHPMailer-FE_v4.11\_lib\class.phpmailer.php on line 515
Voici la ligne 515 du fichier class.phpmailer.php:
include_once($this->PluginDir . 'class.smtp.php');
Bout de code de class.phpmailer.php (1911 lignes en tout!):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| function SmtpSend($header, $body) {
include_once($this->PluginDir . 'class.smtp.php');
$error = '';
$bad_rcpt = array();
if(!$this->SmtpConnect()) {
return false;
}
$smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
if(!$this->smtp->Mail($smtp_from)) {
$error = $this->Lang('from_failed') . $smtp_from;
$this->SetError($error);
$this->smtp->Reset();
return false;
}
... |
C est ma premiere utilisation de cette bibliothèque ...
Pouvez vous m aider?
Cordialement
Partager