This topic is locked

Email Sending on Client Server Error

7/23/2024 6:27:20 AM
PHPRunner General questions
P
PK author

This does not really relate to PHPRunner but I believe someone may have faced this problem before and if resolved might help someone else int he future

My app sends email notifications to users using an office 365 email account. It is installed on prem on customer's local server and it works great with all customers except one (which happens to be a bank). Take the app outside the bank's network, it works great. Back onto the network, stops working

Error says: SMTP Error: Could not connect to SMTP host.

The debugging info:

img alt

The file and line number being referred to:

img alt

What we have tried:

  1. The email feature works ok outside the bank’s network so I guess its not an issue of “less secure apps” not being allowed to send emails without an app specific token as is required on gmail etc.
  2. We setup the email account on the microsoft outlook client and it sends (port 587 with TLS) same port we have in the app
  3. What are we overlooking? Firewall? anti-virus? Does the fact that the their server is a VM or that they use a VPN relevant? or something in the apache server



Thanks
Percy

P
PK author 7/23/2024

Hello,
After some more investigating I need to restate my problem.
When I test the email functionality using 'reset password', the it works only on my pc (developement pc). Also functions that use runner_mail are all working

But once I copy the output folder to another PC (the server - to host the app using xampp), the mail functions do not work anymore. The last error message I got while testing the 'reset password' is:

Fatal error: Maximum execution time of 120 seconds exceeded in C:\xampp\htdocs\output\libs\phpmailer\class.smtp.php on line 1097

When I copy the output files, are there maybe other files I need to copy as well?
Does this have anything to do with how xampp is configured?

Thanks
PK

P
PK author 7/23/2024

Another update to this.
So when I out using in-built server the mail function works great But once I output to "My own web server", on my PC to the xammp htdoca folder, the mail function gives me the error described earlier. I installed PHPRunner on another PC and used the in-built server and it worked again but from the in-built server I cannot access the page from another PC on the network, It has to be hosted in xampp to be accessible. But when I output to the xampp folder, it does not work.
This is my first commercial PHP project and its really giving me a hard time.
Is there something else I need to do in xampp?

Thanks
PK