Fatal error: Uncaught. Is it the form or the 365 server?

Home Forums Quform PHP Fatal error: Uncaught. Is it the form or the 365 server?

This topic is: not resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #37945
    fabydesign
    Participant

    Hello I have the following errors in trying to send form to Office 365.
    I do not have access to MIcrosoft setting, the IT guy does. Before asking I need to know where the errors are coming from. Either a bad customization of the form/scripts (my bad) or the wrong info or bad setup from him (Office 365).
    As follow:
    Fatal error: Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server in /home/xxxxx/public_html/quform/vendor/phpmailer/phpmailer/src/PHPMailer.php:2405
    Stack trace:
    #0 /home/xxxxx/public_html/quform/vendor/phpmailer/phpmailer/src/PHPMailer.php(2175): PHPMailer\PHPMailer\PHPMailer->smtpConnect()
    #1 /home/xxxxx/public_html/quform/vendor/phpmailer/phpmailer/src/PHPMailer.php(1798): PHPMailer\PHPMailer\PHPMailer->smtpSend()
    #2 /home/xxxxx/public_html/quform/vendor/phpmailer/phpmailer/src/PHPMailer.php(1615): PHPMailer\PHPMailer\PHPMailer->postSend()
    #3 /home/xxxxx/public_html/quform/process-file-uploads-FR.php(427): PHPMailer\PHPMailer\PHPMailer->send()
    #4 /home/xxxxx/public_html/quform/process-file-uploads-FR.php(479): process()
    #5 {main}
    thrown in /home/xxxxx/public_html/quform/vendor/phpmailer/phpmailer/src/PHPMailer.php on line 2405
    Thank you.

    #37947
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #37955
    fabydesign
    Participant

    Hello Ally,
    Just got back from talking to the host.
    The server does not support OAuth 2.0 for SMTP authentication. OAuth 2.0 is handled on the Microsoft 365 side.
    He said, use Microsoft 365’s own SMTP relay or API-based sending (Graph API), not the server’s SMTP service.
    Remember that only the IT guy has access to 365.
    What can I do on my end, if any?
    What customization is possible with your script, if even possible.
    Thank you very much.

    #37958
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #38022
    fabydesign
    Participant

    Hello,
    Back again at it.
    I will get the info needed (client ID, Token etc.) today from the IT guy. I noticed there is a script hidden far in the vendor folder: get_oath_token.php.
    Same I see in PHPMailer doc on GitHub. That means it can actually send through OAUTH2 connection, contrary of what you wrote earlier…Please explain?
    Now how do I set it up (probably easy), and attach it to my form (process-file-uploads.php) using your scripts? There is no real indication for a non developer person in your docs.
    Since OAUTH2 is the way to go in the very near future, I believe you have or are working on an updated scripts.
    Thank you for the help. I am probably not the only one wondering how to make it work.

    #38023
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #38025
    fabydesign
    Participant

    Hello and thank you again for the answer above.
    I have updated the forms (French and English) but I am missing the “refresh token”.
    I asked the IT guy for it and his answer was : it is MY job to create it?!?
    Lost again….
    If I was to ask for a real support where you take care of it, I guess you know what I need by now, how would I do and how much will it cost me?
    What will you need?
    I have wasted way to much time and the client is getting upset.
    Thank you.

    #38026
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2026 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy