OAVPeterF Posted July 10, 2020 Report Posted July 10, 2020 (edited) 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 July 10, 2020 by OAVPeterF Quote
Administrators ProAvia Posted July 10, 2020 Administrators Report Posted July 10, 2020 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. Quote
OAVPeterF Posted July 10, 2020 Author Report Posted July 10, 2020 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 Quote
Strider Posted July 10, 2020 Report Posted July 10, 2020 You will have to use that, as it doesn't look like it has SMTP built in as it can't find it. So just use your admin email. Quote
Administrators ProAvia Posted July 10, 2020 Administrators Report Posted July 10, 2020 Not cPanel for your email - cPanel for your hosting..... Most hosting includes at least a few email addresses. My admin email ends with my domain name. Quote
OAVPeterF Posted July 11, 2020 Author Report Posted July 11, 2020 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 😒 Quote
Administrators ProAvia Posted July 11, 2020 Administrators Report Posted July 11, 2020 So you are running phpVMS locally on a Ubuntu server? Quote
OAVPeterF Posted July 11, 2020 Author Report Posted July 11, 2020 Not locally, it's in a datacenter and directly connected to the net. Quote
Administrators ProAvia Posted July 11, 2020 Administrators Report Posted July 11, 2020 Ok - well you have to be able to access it somehow. How do you access the server? Quote
Administrators ProAvia Posted July 11, 2020 Administrators Report Posted July 11, 2020 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? Quote
OAVPeterF Posted July 11, 2020 Author Report Posted July 11, 2020 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 Quote
OAVPeterF Posted July 11, 2020 Author Report Posted July 11, 2020 (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 July 11, 2020 by OAVPeterF Typo's Quote
OAVPeterF Posted July 31, 2020 Author Report Posted July 31, 2020 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 Quote
OAVPeterF Posted August 1, 2020 Author Report Posted August 1, 2020 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 Quote
OAVPeterF Posted August 2, 2020 Author Report Posted August 2, 2020 Ah, okay, thanks in advance for the other 2 files! Cheers, Peter Quote
Administrators ProAvia Posted August 4, 2020 Administrators Report Posted August 4, 2020 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 . Quote
OAVPeterF Posted August 4, 2020 Author Report Posted August 4, 2020 @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 Quote
Administrators ProAvia Posted August 4, 2020 Administrators Report Posted August 4, 2020 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!! Quote
Strider Posted August 5, 2020 Report Posted August 5, 2020 If you have an email with a different server, then you will need to setup it up in the local.config file, set the smtp settings to get the emails to go from that. Quote
Strider Posted August 6, 2020 Report Posted August 6, 2020 My reply was not to you, it was to OAVpertF, no need for the attitude Quote
OAVPeterF Posted August 6, 2020 Author Report Posted August 6, 2020 51 minutes ago, Strider said: My reply was not to you, it was to OAVpertF, no need for the attitude As you can see in my first post I already did that. My VA is already 4 years old and the settings as used in my first post always worked in our prior software (VAM). Thanks to @Mamoth112 our emailsystem is working again as well. I do like to mention as well that I have much more confidence in this system then my prior one. Also the people here are very friendly and helpfull. Thanks to all. Cheers, Peter Quote
cayok45282 Posted March 15, 2021 Report Posted March 15, 2021 On 8/4/2020 at 11:19 AM, Mamoth112 said: Here ya go! this will fix it! enjoy! also @ProAvia maybe add this to the repository? newFix.zip 137.84 kB · 5 downloads Thank you, you are a life saver. Quote
William Posted May 8, 2021 Report Posted May 8, 2021 (edited) Hi Guys, can I re-hash this thread since it's not too old? So here's the problem we have. When use of SMTP in the local_config is off the system sends emails and works as it should BUT when turned on there's no sending emails anywhere....Nada the config is right, checked, double checked and triple checked against several different servers (including Gmail) - No dice As soon as the setting is set to "TRUE" there's no more emails, transactional or not Tried the fix in this thread and the different version of PHPMailer - No joy The Util Class also was also checked. The problem is that we really need to be able to use SMTP as we will rely to a new email server because our hosting is on a overly aggressive Microsoft spam blocklist and that is creating a ton of issues. I'm at a loss and don't know where to look anymore, any thoughts? PHPVms is Simpilot 5.5.2 running on PHP 5.5 Edited May 8, 2021 by William Quote
OAVPeterF Posted May 8, 2021 Author Report Posted May 8, 2021 Hi, Does fastmail not uses port 587 for SSL? Just my 2 cents. Cheers, Peter Quote
William Posted May 9, 2021 Report Posted May 9, 2021 (edited) Thanks for the thought, but nope, it's 465. Regardless, it doesn't even work with GMAIL or any other SMTP provider for that matter. Really don't know what to try anymore..... Edited May 9, 2021 by William Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.