In de class.phpmailer.php krijg ik een foutmelding die betreft het volgende:
Fatal error: Class 'SMTP' not found in /public/sites/www.tonneurd.com/class.phpmailer.php on line 1158

Als we deze lijn bekijken in het document krijg ik dit:
     /**
     * Get an instance to use for SMTP operations.
     * Override this function to load your own SMTP implementation
     * @return SMTP
     */
    public function getSMTPInstance()
    {
        if (!is_object($this->smtp)) {
            $this->smtp = new SMTP;
        }
        return $this->smtp;
    }


Kan iemand mij verder helpen met dit probleem?

Groetjes,
Tonny
Include ook eens: class.smtp.php
Heb me eerste fout zelfstandig weten op te lossen.
Uit me 2e fout kom ik echt niet zo makkelijk.
Krijg een foutmelding dat die niet met me SMTP server kan connecten.
Bij deze voeg ik de code toe:
[code]<?php

// $email and $message are the data that is being
// posted to this page from our html contact form
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$comments = $_REQUEST['comments'] ;

// When we unzipped PHPMailer, it unzipped to
// public_html/PHPMailer_5.2.0
require("PHPMailerAutoload.php");

$mail = new PHPMailer();

// set mailer to use SMTP
$mail->IsSMTP();

// As this email.php script lives on the same server as our email server
// we are setting the HOST to localhost
$mail->Host = "smtp.gmail.com"; // specify main and backup server

// Port for e-mail
$mail->Port = 465;

$mail->SMTPAuth = true; // turn on SMTP authentication

// When sending email using PHPMailer, you need to send from a valid email address
// In this case, we setup a test email account with the following credentials:
// email: [email protected]
// pass: password
$mail->Username = "[email protected]"; // SMTP username
$mail->Password = "1----"; // SMTP password

// $email is the user's email address the specified
// on our contact us page. We set this variable at
// the top of this page with:
// $email = $_REQUEST['email'] ;
$mail->From = $email;

// below we want to set the email address we will be sending our email to.
$mail->AddAddress("[email protected]", "Tonny-Boy Verweij");

// set word wrap to 50 characters
$mail->WordWrap = 50;
// set email format to HTML
$mail->IsHTML(true);

$mail->Subject = "You have received feedback from your website!";

// $message is the user's message they typed in
// on our contact us page. We set this variable at
// the top of this page with:
// $message = $_REQUEST['message'] ;
$mail->Body = $comments;
$mail->AltBody = $comments;

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Message has been sent";
?>
[/code}

Kan iemand hiermee verder helpen?

Ivo P op 18/02/2014 14:37:45

http://phpmailer.worxware.com/?pg=examplebgmail

Gebruikt de gebruikelijke poort 587 ipv 465.
Probeer die eens


Werkt helaas ook niet, blijf de foutmelding houden.

Edit: Heb nu een nieuwe foutmelding
2014-02-18 15:26:50	SMTP ERROR: Failed to connect to server: Connection timed out (110) SMTP connect() failed. Message could not be sent.

Voeg dit eens toe
<?php
$mail->SMTPSecure = 'ssl'; 
?>
Ger van Steenderen op 18/02/2014 18:14:12

Voeg dit eens toe
<?php
$mail->SMTPSecure = 'ssl'; 
?>



2014-02-18 19:22:46	SMTP ERROR: Failed to connect to server: Connection timed out (110) SMTP connect() failed. Message could not be sent.
Mailer Error: SMTP connect() failed.


Blijf dezelfde foutmelding houden helaas.
<?php
$mail->SMTPDebug = 1;
?>

Wat krijg je dan?
Ger van Steenderen op 18/02/2014 20:36:47

<?php
$mail->SMTPDebug = 1;
?>

Wat krijg je dan?


Ik krijg precies dezelfde foutmelding...
Connection timed out, misschien de poort niet open vanaf de bron (waar de php draait) naar smtp.gmail.com??
Waar draai je dit script?
Aad B op 18/02/2014 20:50:14

Connection timed out, misschien de poort niet open vanaf de bron (waar de php draait) naar smtp.gmail.com??
Waar draai je dit script?


Goedeavond Aad, het script draait bij mijndomein.nl hosting.

Reageren