Jump to content
phpVMS Forums

Recommended Posts

Afternoon chaps,

 

I have a small question, we recently switched to phpVMS with our small virtual airline, everything is working great and we are on: Version 5.5.2.72 simpilot/php7.2

 

Confirmation Sent

 

Thanks for registering for Open Air Virtual, you will be notified via email of your registration status.

 

Fatal error: Uncaught Error: Class 'SMTP' not found in /var/www/html/core/lib/phpmailer/class.phpmailer.php:1736 Stack trace: #0 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1861): PHPMailer->getSMTPInstance() #1 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1774): PHPMailer->smtpConnect(Array) #2 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1516): PHPMailer->smtpSend('Date: Fri, 10 J...', 'This is a multi...') #3 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1352): PHPMailer->postSend() #4 /var/www/html/core/classes/Util.class.php(306): PHPMailer->send() #5 /var/www/html/core/modules/Registration/Registration.php(145): Util::SendEmail(''mail_taken_out...', 'A user has regi...', '<html><head></h...') #6 /var/www/html/core/modules/Registration/Registration.php(42): Registration->ProcessRegistration() #7 /var/www/html/core/classes/MainController.class.php(218): Registration->index() #8 /var/www/html/index.php(70): MainController::RunAllActions() #9 {main} thrown in /var/www/html/core/lib/phpmailer/class.phpmailer.php on line 1736

 

Local.config.php

# Email Settings
Config::Set('EMAIL_FROM_NAME', 'Information Open Air Virtual');
Config::Set('EMAIL_FROM_ADDRESS', 'send_from_my_mail');

Config::Set('EMAIL_USE_SMTP', true);
# Add multiple SMTP servers by separating them with ;
Config::Set('EMAIL_SMTP_SERVERS', 'smtp.strato.com');
Config::Set('EMAIL_SMTP_PORT', '465');
Config::Set('EMAIL_SMTP_USE_AUTH', true);
Config::Set('EMAIL_SMTP_SECURE', 'ssl'); # must be "ssl" for Google Apps
Config::Set('EMAIL_SMTP_USER', 'send_from_my_mail');
Config::Set('EMAIL_SMTP_PASS', '******************');

 

Send_from_my_mail and **** are correctly filled in in the original.

 

Thanks in advance for the help!

 

Cheers,

 

Peter

Edited by OAVPeterF
Link to post
Share on other sites

Is the email address associated with your VA domain or elsewhere (Gmail, Hotmail, etc.)?

If you have an email address entered in as the 'admin' email, you don't really need any of the entries you changed/added above. It should just work.

 

There are issues sometimes with the email host in that mass emails may be blocked. Many times, you can check in cPanel to see if the emails are going out or bouncing back to your host.

Link to post
Share on other sites

The email I use is indeed associated with my VA. About that admin email, thank you for that tip 😀!

 

I don't have a cPanel for my mail, I use the mailserver from the company I rent the Linux server from. (Strato)

 

Cheers,

 

Peter

 

 

Link to post
Share on other sites

The thing is that I don't have hosting, I have a plain Ubuntu server. Our email is on a seperate server where we have the emailserver (not maintaint by me). This thing dives me nuts lol tried nearly everything I could find 😒

Link to post
Share on other sites

In my mind, if the server is in a datacenter, you are using a hosted server. Who physically maintains the server at the datacenter? Is it a VPN? I'm guessing you are paying someone to use the server - that would be your host. Can a panel -like cPanel - be added to make access easier?

 

Are any emails able to be sent from the site? 

Are email sent thru the site getting to the admin email? New PIREP submitted, new pilot registration, new Contact Us submittal?

Link to post
Share on other sites

No there is no CPanel or anything. As we only have 1 website with 1 VA we decided to do it on a 'bare server'. Otherwise you get all kind of trouble with multiplayers, Teamspeak etc etc. And no email at all is going out, it looks like it's getting stuck on the phpmailer.php

 

Link to post
Share on other sites
Posted (edited)

Solved! Took the class.phpmailer.php, class.pop3.php and class.smtp.php from a new Wordpress install. Replaced the one in the Core/lib/phpmailer with that one from the Wordpress and working like mad now 🙂 Thanks for all who helped!

 

Edited by OAVPeterF
Typo's
Link to post
Share on other sites
  • 3 weeks later...

Sorry mate we are back at square one as the database was not working anymore. For this moment I don't have any idea what to do. VAM was working fine for 4 years in our setting (1 seperate webserver and 1 external (like Office365) email server. I just am not able to grasp this error. Everything is there, rights are set... don't have a clue atm.

 

Cheers,

 

Peter

Link to post
Share on other sites
10 hours ago, OAVPeterF said:

Sorry mate we are back at square one as the database was not working anymore. For this moment I don't have any idea what to do. VAM was working fine for 4 years in our setting (1 seperate webserver and 1 external (like Office365) email server. I just am not able to grasp this error. Everything is there, rights are set... don't have a clue atm.

 

Cheers,

 

Peter

ive found a fix.

 

ill post the edited file that fixes everything

fix.zip

Link to post
Share on other sites

Thank you but did not do the trick for me. I get a fatal error now:

 

Fatal error: Cannot declare class PHPMailer\PHPMailer\SMTP, because the name is already in use in /var/www/vhosts/openairvirtual.eu/httpdocs/core/lib/phpmailer/class.smtp.php on line 30

 

Cheers,

Peter

Link to post
Share on other sites
14 hours ago, OAVPeterF said:

Thank you but did not do the trick for me. I get a fatal error now:

 

Fatal error: Cannot declare class PHPMailer\PHPMailer\SMTP, because the name is already in use in /var/www/vhosts/openairvirtual.eu/httpdocs/core/lib/phpmailer/class.smtp.php on line 30

 

Cheers,

Peter

ah yes right. i forgot to give the other 2 files :D

Link to post
Share on other sites
10 hours ago, Mamoth112 said:

Here ya go! this will fix it!

 

enjoy! also @ProAvia maybe add this to the repository?

newFix.zip 137.84 kB · 2 downloads

 

Your fix may only be specific to your server, server software or how you have things set up on your site.

 

phpVMS 5.5.2.72 uses PHPMailer 6.0.7 and seems to work correctly for the majority of users under PHP 7.0-7.2 .

The PHPMailer version in your fix appears to be 6.0.7 - maybe with a few edits??

phpVMS 5.5.2 (Simpilot) includes PHPMailer 5.2.8 .

Link to post
Share on other sites

@Mamoth112 Working lovely now! Thank you so much mate!

 

@Proavia could it be the case that if you have an separate emailprovider (Like Office365) and not an local one that then this error comes up?

 

btw I am an happy user chaps, we said to eachother that we needed this system already 4 years ago.

 

Cheers,

Peter

 

Link to post
Share on other sites
1 hour ago, OAVPeterF said:

@Mamoth112 Working lovely now! Thank you so much mate!

 

@Proavia could it be the case that if you have an separate emailprovider (Like Office365) and not an local one that then this error comes up?

 

btw I am an happy user chaps, we said to eachother that we needed this system already 4 years ago.

 

Cheers,

Peter

 

 

I guess that may be one reason. This is the first time I have heard of issues with it though.
I know of several sites that use gmail as the email provider and have no issues. I use an on site email address for mine though.

 

There are so many variables, it's difficult to account for them all. And it is virtually impossible to build in "fixes" for every possibility. Don't forget, we are dealing with a 10+ year old program. We are lucky that it still (mostly) works in today's environment.

 

Glad you were able to sort it!!

Link to post
Share on other sites

havent changed versions of the addons. they are the default ones that came with the latest phpvms 5.5.2.72. 

the changes i made where making the Util.class.php and the other phpmailer files all use phpmailerautoload.php because the Util class couldnt find the phpmailer smtp class or the phpmailer mail class.

Link to post
Share on other sites

what do you think i did mate? 

the error was with phpmailer not being able to find the other classes.

its not an issue that i made.

I managed to find a fix to this issue. this fix has helped me and others.

as stated with the original question.

Quote

Fatal error: Uncaught Error: Class 'SMTP' not found in /var/www/html/core/lib/phpmailer/class.phpmailer.php:1736 Stack trace: #0 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1861): PHPMailer->getSMTPInstance() #1 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1774): PHPMailer->smtpConnect(Array) #2 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1516): PHPMailer->smtpSend('Date: Fri, 10 J...', 'This is a multi...') #3 /var/www/html/core/lib/phpmailer/class.phpmailer.php(1352): PHPMailer->postSend() #4 /var/www/html/core/classes/Util.class.php(306): PHPMailer->send() #5 /var/www/html/core/modules/Registration/Registration.php(145): Util::SendEmail(''mail_taken_out...', 'A user has regi...', '<html><head></h...') #6 /var/www/html/core/modules/Registration/Registration.php(42): Registration->ProcessRegistration() #7 /var/www/html/core/classes/MainController.class.php(218): Registration->index() #8 /var/www/html/index.php(70): MainController::RunAllActions() #9 {main} thrown in /var/www/html/core/lib/phpmailer/class.phpmailer.php on line 1736

 

class.smtp.php was not found by class.phpmailer.php because it was not loading it properly, nor did its dependacies have access to it either. i fixed that. now it works correctly. i did set the SMTP settings.

@Strider

Edited by Mamoth112
forgot to add info
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...