Jump to content

Emails not going out


OAVPeterF

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 comment
Share on other sites

  • Administrators

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 comment
Share on other sites

  • Administrators

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 comment
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 comment
Share on other sites

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 comment
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 comment
Share on other sites

  • Administrators
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 comment
Share on other sites

  • Administrators
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 comment
Share on other sites

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

Link to comment
Share on other sites

  • 7 months later...
  • 1 month later...

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

 

 

AAL Mail.png

Edited by William
Link to comment
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...