Emails not going out

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

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.

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

 

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

 

 

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.

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.

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 😒

So you are running phpVMS locally on a Ubuntu server?

Not locally, it’s in a datacenter and directly connected to the net.

Ok - well you have to be able to access it somehow. How do you access the server?

Via SSH (Putty)

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?

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

 

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 :slightly_smiling_face: Thanks for all who helped!

 

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

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, okay, thanks in advance for the other 2 files!

 

Cheers,

 

Peter

Wonderful, thank you!

10 hours ago, Mamoth112 said:

Here ya go! this will fix it!

 

enjoy! also maybe add this to the repository?

[newFix.zip 137.84 kB · 2 downloads](< base_url >/applications/core/interface/file/attachment.php?id=4388)

 

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 .

 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

 

1 hour ago, OAVPeterF said:

 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!!