2
I am running phpmailer codes and the following error warning appears:
Fatal error: Class 'SMTP' not found in public_html/php/phpmailer/class.phpmailer.php on line 1291
Can someone help me?
2
I am running phpmailer codes and the following error warning appears:
Fatal error: Class 'SMTP' not found in public_html/php/phpmailer/class.phpmailer.php on line 1291
Can someone help me?
1
The path is wrong, look for the wrong line, and erase the beginning that should be phpmailer/class.phpmailer.php
, leaves only class.phpmailer.php
.
-1
Hello,
The SMTP function is not found in the patch of your php file:
public_html/php/phpmailer/class.phpmailer.php
I recommend analyzing line 1291 in the above file for more details about the code and possibly resolve the error, make sure your phpmailer is properly compiled.
Browser other questions tagged php phpmailer
You are not signed in. Login or sign up in order to post.
The archive
class.smtp.php
is in the same folder as thePHPMailerAutoload.php
?– Felipe Douradinho
Yes, it is! I got it from phpmailer’s website github. ?
– GustavoSevero
Click on
editar
of your question, there is a button with image icon!– Felipe Douradinho
Look at the picture, it’s all together.
– GustavoSevero
You have checked that it is equal to https://github.com/PHPMailer/PHPMailer/blob/master/examples/mail.phps ?
– Felipe Douradinho
No! I got the code, but I didn’t know it has to be the same as this code. .
– GustavoSevero
Now I left the code with the link you sent and that message sounded. Warning: file_get_contents(Contents.html) [Function.file-get-Contents]: failed to open stream: No such file or directory in /home/petsm976/public_html/php/partners.php on line 383
– GustavoSevero
So this is just an example, there are many things you will not need with this line that is causing your error
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
– Felipe Douradinho
And how I put content, text in the email, because now this appears: Mailer Error: Message body Empty
– GustavoSevero
Instead of
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
the correct would be$mail->msgHTML("Meu código <strong> em negrito</strong>");
– Felipe Douradinho
I got it, I changed it like you said. But and because I can’t use the other code, because it gives this SMTP problem?
– GustavoSevero
I think it’s the location of the folders...?
– Felipe Douradinho
@Felipedouradinho, I managed to make it work, but only now that I have uploaded my application to a server. Running local, no way. Value all the same.
– GustavoSevero
Whoa, imagine a haha
– Felipe Douradinho